Forum Discussion
evilgreenred
Jan 03, 2023Copper Contributor
Create a dynamic pivottable
HI there I would like to create a pivot table such that whenever user select >60 years of age, it will show the count of >60 and <60 years of age. If user change to 65 years of age, the excel wil...
SergeiBaklan
Jan 03, 2023MVP
With Power Query you may add table with target age into data model
which will be updated on Refresh All. To count the ages two measures
Before:=CALCULATE( COUNTA(Age[Age]), Age[Age] < VALUES(target[target]) )
After:=CALCULATE( COUNTA(Age[Age]), Age[Age] >= VALUES(target[target]) )
which gives