Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have the column "# Flex Usage" measure and want to get a % of the total for these. For example, in the last row, I want to see 9/130. How can I do this?
Solved! Go to Solution.
Hi @Hudg16 ,
Create a measure as below:
Measure =
var _total=CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Name]=MAX('Table'[Name])))
Return
DIVIDE(SUM('Table'[Value]),_total)
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Hi @Hudg16 ,
Create a measure as below:
Measure =
var _total=CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Name]=MAX('Table'[Name])))
Return
DIVIDE(SUM('Table'[Value]),_total)
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Create two new measures:
# Flex Usage Grand Total = CALCULATE ( [# Flex Usage] , ALL() )
% of Grand Total Flex Usage = DIVIDE ( [# Flex Usage], [# Flex Usage Grand Total] )
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@Hudg16 Please let us know if your problem has been solved. @v-kelly-msft has provided an alternate solution if you want to divide by the subtotal instead of my solution which uses Grand Total.
Of course, any questions you have on why or how they work, just ask!
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
80 | |
76 | |
61 | |
36 | |
32 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |