Forum Discussion
Count if with existing measure
Try this pattern
Measure = COUNTX ( ALLSELECTED ( TableName[Week_Column] ), [AUP Measure] )
- ewuchatka8 years ago
Helper II
Thank you that's a great step towards what I need, it helps me calculate a total number of Weeks.
How can I amend the formula to get to number of weeks where AUP is below 1.10 i.e. [AUP]<=1.10?
Thanks
Ewa
- Zubair_Muhammad8 years ago
Community Champion
Try with this
Measure = COUNTX ( FILTER ( ALLSELECTED ( TableName[Week_Column] ), [AUP Measure] < 1.1 ), 1 )- ewuchatka8 years ago
Helper II
Hi guys
Thanks very much :)
I'm almost there.... I think the formula is counting rows and in the data there is more than one row per date as there are different products for each date. So what I need is for the formula to calculate AUP for each date and then count weeks with AUP <1.
Thanks
- tex6288 years ago
Community Champion
Try creating a measure like this:
Measure = Calculate(Countrows([table]);[AUP]>1)
Assuming you have one row per week, place this in a table with a row for each year you should get the amount of weeks > 1.
/ Johannes
- v-piga-msft8 years ago
Resident Rockstar
Hi ewuchatka,
Have you solved your problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you need additional help, please feel free to ask.
Best Regards,
Cherry