Forum Discussion
Pierrechapar
4 years agoFrequent Visitor
Help with % in stacked column chart.
Hi all, I've been looking aroud to see if I could find anything to help me solve my query. Since I didn't I turn ove tou you guys for help. I have this stacked column chart that displays num...
AlexisOlson
4 years agoSuper User
You can define a measure that calculates the first month's value and then scale all the other values by dividing by that amount.
Something like this:
BaseValue =
VAR FirstMonth = CALCULATE ( MIN ( Table1[Date] ), ALLSELECTED () )
RETURN
CALCULATE ( SUM ( Table1[Amount] ), ALL ( Table1 ), Table[Date] = FirstMonth )Pierrechapar
4 years agoFrequent Visitor
Thanks Alexis for the response.
Just a quick question. Why a SUM in the return calculate? The actual measure is a DistinctCount(id_customer).
I ask because I don't have any field to SUM.
Any way, I tried with the formula you mention with SUM and with DistinctCount and it doesn't work.
The end measure used is = Divide(Distinctcount(id_customer), BaseValue)
What could I be doing wrong?
Thanks!!
- AlexisOlson4 years agoSuper User
I picked SUM just as a guess. Use whatever aggregation is appropriate for your case.