Forum Discussion
Anonymous
6 years agoNot applicable
Percentage over Monthly Total
Hi
I need to calculate the percentage over month for the distinct cound of Customer IDs.
I'm using the following formula, but I am getting the percentage for the whole periods, and not by month
What am I doing wrong?
Thanks!
PercentageByMonth=
DISTINCTCOUNT('FactTable'[ID]) /
CALCULATE(
DISTINCTCOUNT('FactTable'[ID]);
ALL('Calendar'[Year-Month])
)
- Anonymous6 years ago
I've finally solved. I need to use the Field that is going to be used as a legends, not the fields from the calendar.
PercentageByMonth= DISTINCTCOUNT('FactTable'[ID]) / CALCULATE( DISTINCTCOUNT('FactTable'[ID]); ALL('Table'[FieldUsedAsLegend]) )
2 Replies
- AnonymousNot applicable
I've finally solved. I need to use the Field that is going to be used as a legends, not the fields from the calendar.
PercentageByMonth= DISTINCTCOUNT('FactTable'[ID]) / CALCULATE( DISTINCTCOUNT('FactTable'[ID]); ALL('Table'[FieldUsedAsLegend]) ) - amitchandak
Super User
Can you share sample data and sample output.