Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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êsThe Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |