Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Calculated Measure problem

$
0
0

hi, i have column in my table that has specific values for months until Nov(CortanaHeavy,CortanaMedLight), and from December other values(CortanaHeavy,CortanaLight,CortanaMedium).

i want to create a pie chart with measure filtered by this column.

i have also month slicer

if month previous December is selected, there is no problem, also if only December is selected.

the problem is when selecting both November and December.

i want to to show in the report only the November values (CortanaHeavy,CortanaMedLight).

cortana heavy - need to sum all of this measure with this value (same for Nov and Dec)

Cortana Med light - need to sum CortanaMedLight(November)+CortanaLight+CortanaMedium(December)

 

i wrote this measure: but for some reason it  shows only the CortanaHeavy Value

 

Views = if(And(month(min(Query1[Date]))<12,month(max(Query1[Date]))>11),IF(HASONEVALUE(Query1[Engagement Cohort]),
if(values(Query1[Engagement Cohort])="CortanaHeavy",sum(Query1[CardViewed]),IF(HASONEVALUE(Query1[Engagement Cohort]),if(values(Query1[Engagement Cohort])="CortanaLight",0,if(values(Query1[Engagement Cohort])="CortanaMedium",0,CALCULATE(sum(Query1[CardViewed]),filter(all(Query1[Engagement Cohort]),Query1[Engagement Cohort]="CortanaMedLight"))+CALCULATE(sum(Query1[CardViewed]),filter(all(Query1[Engagement Cohort]),Query1[Engagement Cohort]="CortanaMedium"))+CALCULATE(sum(Query1[CardViewed]),filter(all(Query1[Engagement Cohort]),Query1[Engagement Cohort]="CortanaLight"))))))))

 

it's a bit messy because i tried different ways to make it work Smiley Sad

Capture23.PNG

 

 

attached image to see that there are values to sum, and the measure that calculated for the first only

 

thanks!


Viewing all articles
Browse latest Browse all 213819

Trending Articles