Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Good morning,
I have been struggling for some time with displaying percentages relative to the column total (the month), but only get the percentages displayed of the total (the year). I've searched a lot on the internet but I really can't figure it out. Hopefully you can help me further.
I want to translate this table into percentages where each month is 100%:
I have used different formulas, but the filters from the date table that are selected in the report (month and year) will continue to relate to the output. For now I use the following formula:
% Hour type =
VAR X =
SUM(Hours[Hours])
VAR Y =
SUMX(
ALLSELECTED(Hours),
Hours[Hours])
RETURN
DIVIDE(X,Y)
The table looks like this:
I have tried ALL instead of ALLSELECTED to, but then the year is not taken into to calculation...
I use the following tables:
Date table (for the months)
Hour table (for the hours)
Hour type table (for the translation of the hours)
Hopefully you can help me out guys, I'd really appreciate it.
Kind regards,
Ramon
Solved! Go to Solution.
@Anonymous , Try like
DIVIDE(SUM(Hours[Hours]),calculate(SUM(Hours[Hours]),allexcept(Table,Table[Month])))
@Anonymous , Try like
DIVIDE(SUM(Hours[Hours]),calculate(SUM(Hours[Hours]),allexcept(Table,Table[Month])))
I found the solution and it was much closer than expected. Feel very stupid and a waste of time.
Displaying the option value as a percentage of column total had completely eluded me.
In any case, thank you very much for the effort !
Hi Amitchandak,
Thank you for your reaction!
Unfortunately, the formula doesn't seem to work...`I have hours of 2019 and 2020. And now te percentages where calculate for both years together...
% hour type = DIVIDE(SUM(Hours[Hours]),calculate(SUM(Hours[Hours]),allexcept(Date table,Date table[Month])))
Is there anything I can do to clarify the problem?
Kind regards,
Ramon
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
85 | |
85 | |
70 | |
68 | |
63 |
User | Count |
---|---|
214 | |
124 | |
117 | |
82 | |
76 |