Forum Discussion
Paul_Cracknell
Sep 17, 2022Copper Contributor
DAX: Count the weeks where price is over $18
Hi, all. I have a power pivot where I'd like to count the number of weeks where average price exceeded $18. Any help would be greatly appreciated.
Lorenzo
Sep 18, 2022Silver Contributor
Assuming data in Table1 and the average measure is named Avg Price
in E3:
=CUBESETCOUNT(
CUBESET("ThisWorkbookDataModel", "FILTER([Table1].[Week].Children, [Measures].[Avg Price] > 18)")
)