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.
2 Replies
- LorenzoSilver Contributor
If you want your filtering value in a cell like in E3 below:
in F3:
=CUBESETCOUNT( CUBESET("ThisWorkbookDataModel", "( FILTER( [Table1].[Week].Children, [Measures].[Avg Price] > " & E3 & " ) )" ) )
- LorenzoSilver 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)") )