Sep 17 2022 10:04 AM
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.
Sep 18 2022 06:09 AM - edited Sep 19 2022 11:11 PM
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)")
)
Sep 19 2022 12:41 AM
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 & "
)
)"
)
)