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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I've created a measure to show me the percentage of responses to a particular question on a survey, over a number of years...
@Anonymous Are you slicing the data by the Dates table? if yes, try something like this:
=
DIVIDE (
SUM ( 'FYE Data (2)'[Response] ),
CALCULATE (
SUM ( 'FYE Data (2)'[Response] ),
ALL ( 'FYE Data (2)' ),
VALUES ( Dates[Calender Year Number] )
)
)
Thanks for your suggestion. I wasn't slicing by the calendar table but tried with your suggestion and the same behaviour as described above happened.
I'm not entirely why this would not be working as it seems a relatively straightforward measure/calculation
@Anonymous , allexcept work like % of subtotal . means you will get % within year
Measure = divide(SUM('FYE Data (2)'[Response]) , CALCULATE(sum('FYE Data (2)'[Response]), ALLEXCEPT('FYE Data (2)', 'FYE Data (2)'[Year])))
All will work for % of total
Measure = divide(SUM('FYE Data (2)'[Response]) , CALCULATE(sum('FYE Data (2)'[Response]), ALL('FYE Data (2)')))
refer:https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/
https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390
Hi @amitchandak
Thank you for your suggestion too. I tried this also but it came back with the same result eg. the % displayed correctly when slicing on one year...
...but slicing on on an additional year, then it updates the 2020 values to.
The measure was formatted to %, and then set to show value as % of GT
Hi @Anonymous ,
You can just create a measure
Measure =
var a = CALCULATE(SUM('FYE Data (2)'[Response]))
var b = CALCULATE(SUM('FYE Data (2)'[Response]), ALL('FYE Data (2)')
RETURN
DIVIDE (a,b)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Thank you for replying. I tried your suggested measure but it came back as syntax incorrect. Am I inputting it incorrectly?
Thanks
Pete
@AnonymousThank you - looks like there was a missing ) highlighted in red. Unfortunately that has the same impact as the other suggested solution.