Forum Discussion
Count Text Measure
Hi I have a measure that will let me know if someone is expected to make a target
Hey Anonymous
Create the following two measureCount of No = CALCULATE(COUNT(SQL[Expected to Make Target]), SQL[Expected to Make Target] = "No")
Count of Yes = CALCULATE(COUNT(SQL[Expected to Make Target]), SQL[Expected to Make Target] = "Yes")
and use them to plot cards and pie charts, you will get following result
If this helps you, please mark my solution as accepted so that others can find this quickly when they face a similar issue. Thank you!
10 Replies
- Dhairya
Solution Supplier
Hey Anonymous
One workaround is that create a Calculated column instead of measure with the same Dax code and plot it in the value field of the pie chart.
If this helps you, please mark my solution as accepted so that others can find this quickly when they face a similar issue. Thank you!- AnonymousNot applicable
I want to see a number like a the Number of No expected not to make target, but when I put in card view it does not give me an option to count. Intstead it just shows No
I tried putting in count display name and then filtering it by No but I get 3,932, however there should only be 3
I've tried a use the measure =
CALCULATE(COUNTROWS(SQL), FILTER(SQL,[Expected to Make Target]= "No")), however that gave me 44, however it should be 3.- Dhairya
Solution Supplier
Hey Anonymous
Create the following two measureCount of No = CALCULATE(COUNT(SQL[Expected to Make Target]), SQL[Expected to Make Target] = "No")
Count of Yes = CALCULATE(COUNT(SQL[Expected to Make Target]), SQL[Expected to Make Target] = "Yes")
and use them to plot cards and pie charts, you will get following result
If this helps you, please mark my solution as accepted so that others can find this quickly when they face a similar issue. Thank you!
- Ahmedx
Super User
pls try this
CALCULATE(COUNTROWS(SQL), FILTER( ALL(SQL) ,[Expected to Make Target]= "No"))