Forum Discussion
Distinct Count with Filter- Year Minus 1,2
- 2 years ago
I was able to resolve this on my own. The way that I was able to get the result was to use the initial measure in a second measure. So first measure is:
Measure1 =
CALCULATE(
DISTINCTCOUNT(Table1[AccountKey]),
FILTER(Table1, Table1[Amount] > 0))...second measure is
Measure2 =
CALCULATE(Measure1, dateadd('Calendar'[Date],-1,year))
...this returns the same distinct count of the accountkey column, but does so for the prior year. Thanks for all who responded!!
I was able to resolve this on my own. The way that I was able to get the result was to use the initial measure in a second measure. So first measure is:
Measure1 =
CALCULATE(
DISTINCTCOUNT(Table1[AccountKey]),
FILTER(Table1, Table1[Amount] > 0))
...second measure is
Measure2 =
CALCULATE(Measure1, dateadd('Calendar'[Date],-1,year))
...this returns the same distinct count of the accountkey column, but does so for the prior year. Thanks for all who responded!!