Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jagbatth
Regular Visitor

Need help Showing values as % of parent column total.

Can anyone please help in trying to find a way to show, based on Quarter 1 and Quarter 2, rows as a percent of total. in POWER BI

Current view in Power BI showin percent of row total.... I need percent of row total but based on parent column... like for Q1 it should be 20% for adjusted and 80% for FTC to malke 100% not like below where its 20% then 40% then 40% to make 100%.

View in power BI getting whole row to be 100% but need by quarter.View in power BI getting whole row to be 100% but need by quarter.IN EXCEL IT IS POSSIBLE by JUST using "VALUE FIELD SETTINGS" THEN SHOWING VALUES AS " % OF PARENT COLUMN TOTAL" but I cant do this in power bi?? In excel it is possible!In excel it is possible!Need this above view in power BI! Anyone can help please?

 

THANKS!

1 ACCEPTED SOLUTION

Hi @jagbatth ,

 

Please try:

Measure = 
var _a = SUM('Table'[Errors])
var _b = CALCULATE(SUM('Table'[Errors]),REMOVEFILTERS('Table'[Type]))
return DIVIDE(_a,_b)

Final output:

vjianbolimsft_0-1684215224369.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
jagbatth
Regular Visitor

@v-jianboli-msft 

Thank you for your reply,

So in Excel there is an option of value field settings, summarize value by and then show value as>> % of parent column total. In my case I have 2 quarters (PARENT COLUMN) Q1 2023 and Q2 2023 and within that I have two other sub categories ADJ and FTC and as you can see from screen shot above, in excel we can show the percentage by row based on parent column (82 + 18 for CA = 100%.) However when trying to do same thing in Power BI, we can not achive this as the only options are: Show values as % of Grand total, as % of column total and the one I have chosed: % or row total. BUT I do not need this! I need Percentage of row total at the Quarter level!

I have triend so many formulas and cannot get this to work.

My raw data is below:

Raw Data.PNG

Please help!

 

Thank you.

Hi @jagbatth ,

 

Please try:

Measure = 
var _a = SUM('Table'[Errors])
var _b = CALCULATE(SUM('Table'[Errors]),REMOVEFILTERS('Table'[Type]))
return DIVIDE(_a,_b)

Final output:

vjianbolimsft_0-1684215224369.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Fantastic! Thank you so much Jianboli! Your the best!

v-jianboli-msft
Community Support
Community Support

Hi @jagbatth ,

 

What does your original data look like?

Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors