Forum Discussion
hugors
4 years agoRegular Visitor
Filter or virtual table
I have a measure where I calculate a percentage, I need to count the records that have a percentage greater than or equal to 80 but I can't do this filter and count all the measures that I try do n...
- 4 years ago
Don't have enough info about your model, but just by looking at your measure, try to replace it with:
vM80 =CALCULATE(DISTINCTCOUNT([CO_MUNICIPIO]),F_Dados[c_CV Geral]>=80))
it as if you will write:vM80 =CALCULATE(DISTINCTCOUNT([CO_MUNICIPIO]),FILTER(ALL(F_Dados[c_CV Geral]),F_Dados[c_CV Geral]>=80))
which is different substentially than what you wrote so maybe it will solve your problem quickly - 4 years ago
I tried it before but it didn't work
Anonymous
4 years agoNot applicable
Hi hugors ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Flag =
IF(
[CV %] >=80,1,0)discount =
CALCULATE(DISTINCTCOUNT(F_Dados[ID]),ALLSELECTED('F_Dados'))
2. Place [Flag]in Filters, set is=1, apply filter.
3. Result:
If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- hugors4 years agoRegular Visitor
The solution is interesting but it didn't work either, I'm believing that it may be an association problem between the models. I keep trying, thanks for the help