How to create separate measure based on each Dimensions field value

HI Team,
I have a scenarios like I want to create a separate measure column and for each field data available on a dimension field.
I created some calculated field and trying to do that but I am not able to plot when I put the measure for a single dimension then it is adding for other two dimension also.
PFB picture for your understand my query


I Created the test-1 calculated field for ios dimension but it is automatically add other two dimension field data aslo.

I need test-1 only for ios test-2 for Canvas test-3 for Android

@Biswajit_1993 - You need to go for ifelse statement construct like below.

test_1 = ifelse(mobile_os = “ios”, measure_value, 0)
test_2 = ifelse(mobile_os = “Canvas”, measure_value, 0)
test_3 = ifelse(mobile_os = “Android”, measure_value, 0)

Hope this helps!

Did my suggestion help you in resolving your query? If yes, would request you to mark the post as “Solution”. This will help the community to find guidance and answers to similar question. Thank you!

1 Like

hi @sagmukhe this calculation is not working for me when I put this then for each dimension field data 3 measures comes to the visual it means when I am putting all three then total 3 dimension field and 3 measure field total 9 columns are showing.
Can you check once on your end.

Thanks & Regards
Biswajit Dash

@Biswajit_1993 - You should not be putting the dimension again as you have already incorporated that in your measures. You should go for a Table instead of Pivot with 4 columns Date (dimension), test1 (measure), test2(measure) and test 3(measure). Hope this helps to clarify.

1 Like