I would like to count the number of month in a Year / Month Pivot table that have sales,
so if all months have sales = 12 etc.
I have managed to do this by using the date column and the built in hierarchy in the fact table ;
TableCount:= COUNTROWS(SUMMARIZE(Table1,Table1[Date (Year)],Table1[Date (Month)]))
and then ;
ModifyTableCount:=CALCULATE( [TableCount], ALL(Table1),VALUES(Table1[Date (Year)]) )
Which works, surprisingly, when used in a pivot table using the Calendar / date table years and months.
Is there way to get this result with creating all the extra columns in the sales / fact table as these only existed creating the pivot using the date hierarchy.
I've attached both showing both using Dates from date table and dates from fact table.
Richard.
Bookmarks