Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
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 |
---|---|
90 | |
88 | |
88 | |
79 | |
49 |
User | Count |
---|---|
153 | |
145 | |
106 | |
74 | |
55 |