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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ramandeep_saini
Regular Visitor

100% stacked column graph on unpivot data by filtering some rows but keeping value in total

In bleow example data table, how to filter out Key='Success' in 100% stacked column chart but keeping those value for calculation of  denominator value. Desired graph attached. I tried example in excel but need to final thing with lots of data in powerBI.

Data

DateKeyValue
1/04/2022Success100
1/04/2022Error110
1/04/2022Error25
2/04/2022Success200
2/04/2022Error115
2/04/2022Error210


Expected results:

DateKeyValue%Value
1/04/2022Error1108.70%
1/04/2022Error254.35%
2/04/2022Error1156.67%
2/04/2022Error2104.44%

 

ramandeep_saini_0-1649389834269.png

 

1 ACCEPTED SOLUTION

Hi,

You may download my PBI file from here.  You should create a stacked chart (not a 100% stacked chart)

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
ramandeep_saini
Regular Visitor

@Ashish_Mathur : Thanks a lot. your solution solved my problem 🙂

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
AlexisOlson
Super User
Super User

You just need to define an appropriate measure to calculate the percentage you want.

 

Try something like this:

Percent =
DIVIDE (
    CALCULATE ( SUM ( Table1[Value] ), KEEPFILTERS ( Table1[Key] <> "Success" ) ),
    CALCULATE ( SUM ( Table1[Value] ), ALLSELECTED ( Table1 ) )
)

@AlexisOlson : Thanks for quick advise. Your solution is definitly doing what i need but only problem is it's calculating results based on all dates and i need to calculate results sepratly for each day. how to tell fix that measure to seprate(in SQL langauage say group by) calculation for each day(or month or year base on what date group i need) 

Hi,

Please show the expected result very clearly in a simple Table.  Once we get the correct figures there, we can always switch the visual to any other.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur : Added expected result in orig post

Hi,

You may download my PBI file from here.  You should create a stacked chart (not a 100% stacked chart)

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors