Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I have this line chart showing the legend by numbers. Works fine
But now I want it to show percentages instead of numbers. So what is the percentage of each legend-item each month?
I tried this
waarde =
VAR _waarde1 = [Number of Transactions]
VAR _waarde2 = CALCULATE([Number of Transactions], ALLSELECTED('Transactions Clearing Issuing'[Network Type Code]))
RETURN DIVIDE(_waarde1,_waarde2)
giving me this
And I tried this
waarde =
VAR _waarde1 = [Number of Transactions]
VAR _waarde2 = CALCULATE([Number of Transactions], ALLEXCEPT('Calendar Local Date', 'Calendar Local Date'[Year], 'Calendar Local Date'[Month Short ENG Name]))
RETURN DIVIDE(_waarde1,_waarde2)
giving me this
In both solutions each month each lengend-item is 100%. What am I doing wrong?
Regards
Ron
Solved! Go to Solution.
Hi @PowerRon ,
You need to do the calculation based on the full network type and not on the months try something similar to this:
waarde =
VAR _waarde1 = [Number of Transactions]
VAR _waarde2 = CALCULATE([Number of Transactions], REMOVEFILTERS(Table[Network Type Code]))
RETURN DIVIDE(_waarde1,_waarde2)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHmm, now it is fluctuating between 99 and 101%. So be it. It's OK. Thnx for helping Felix
@MFelix you solved it. Thnx.
One more question. I only select the three network types, mentioned in the legend, in the visual.
Each month tehy sum up between 98 and 99,5%. Never 100%. Any idea what is the cause?
Because you look for all the networks and not only the 3 you select redo the metric to this one:
waarde =
VAR _waarde1 = [Number of Transactions]
VAR _waarde2 = CALCULATE([Number of Transactions], ALLSELECTED(Table[Network Type Code]))
RETURN DIVIDE(_waarde1,_waarde2)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @PowerRon ,
You need to do the calculation based on the full network type and not on the months try something similar to this:
waarde =
VAR _waarde1 = [Number of Transactions]
VAR _waarde2 = CALCULATE([Number of Transactions], REMOVEFILTERS(Table[Network Type Code]))
RETURN DIVIDE(_waarde1,_waarde2)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsUser | Count |
---|---|
92 | |
85 | |
77 | |
66 | |
62 |
User | Count |
---|---|
110 | |
95 | |
95 | |
64 | |
59 |