Forum Discussion
Touaibia
4 years agoFrequent Visitor
Error message with the calculate function
Hello everyone, I have a date model with : Sales table Product table Customer table In my company we have 24 products that we are pushing and I want to know how many customer purchased thi...
ValtteriN
4 years agoCommunity Champion
Hi,
I had a similar issue yesterday on one of my projects. The workaround I came up with was to create an intermediate measure for calculating the status based on my condition and then using a SUMX function to calculate count.
So in essence:
[Helper measure] = IF(Sales_Table[24_status]="On target",1,0)
[Final measure] = SUMX(Sales_Table,[Helper measure])
Hopefully this helps and if it does consider accepting this post as a solution!
- Touaibia4 years agoFrequent Visitor
Unfortunately it doesn't work i have 0 on each row when i put this measure in a table with my sales reps
- ValtteriN4 years agoCommunity Champion
Okay, a new idea mirroring your original idea:
Count of onTarget = COUNTROWS(filter(Target,Target[Column1]="OnTarget"))
Test data:
End result:- Touaibia4 years agoFrequent Visitor
My "on target / below target" is a measure not a calculated column soo i can't try this solution 😞