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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Percentage calcualtion for two different tables

Hello, I'm new in Power BI and would like to do percentage of two different tables imported from a SQL server. If I have two columns the next each other, I assume it would be easy like in Excel but how can I perform a percentagate calculation from two different tables imported from an SQL server? I attached two pictures of two tables. 

poko_0-1727168011979.png

poko_1-1727168072044.png

 

4 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on the description, try the following measures:

Closed / Total = 
VAR __closed = CALCULATE(COUNTROWS('Table'),'Table'[Case]="Closed")
VAR __total = CALCULATE(COUNTROWS('Table'),ALL('Table'[Case]))
VAR __result = DIVIDE(__closed,__total)
RETURN
__result
Leading / Leading Total = 
VAR __leading = CALCULATE([Your leading measure], 'Table'[Case]="Closed")
VAR __leading_total = CALCULATE( [Your leading measure], ALL('Table'[Case]))
VAR __result = DIVIDE( __leading, __leading_total )
RETURN
__result

 

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum 

View solution in original post

Anonymous
Not applicable

Hi @Anonymous ,

 

You can turn off text warp for the Column headers and Values, and then manually drag to adjust column widths to achieve the hiding effect.

vcgaomsft_0-1727255441630.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum 

View solution in original post

Anonymous
Not applicable

Hi @Anonymous ,

 

... turn off text warp for the Column headers and Values...

Please check if Text Wrap under Values is turned off.

 

Best Regards,
Gao

Community Support Team

View solution in original post

Anonymous
Not applicable

Hello Gao,

 

Thank you, excellent work I turned off only for Column headers ..and not for Values.. now it works Thanks again.

 

View solution in original post

11 REPLIES 11
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on the description, try the following measures:

Closed / Total = 
VAR __closed = CALCULATE(COUNTROWS('Table'),'Table'[Case]="Closed")
VAR __total = CALCULATE(COUNTROWS('Table'),ALL('Table'[Case]))
VAR __result = DIVIDE(__closed,__total)
RETURN
__result
Leading / Leading Total = 
VAR __leading = CALCULATE([Your leading measure], 'Table'[Case]="Closed")
VAR __leading_total = CALCULATE( [Your leading measure], ALL('Table'[Case]))
VAR __result = DIVIDE( __leading, __leading_total )
RETURN
__result

 

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum 

Anonymous
Not applicable

Hello Gao,

 

The other percentage works excellent as well Thank you ,again the same problem it repeats all the way to the end, how can I setup filtering for visualisation? I want to keep it only in red circle.

poko_1-1727255784725.png

 

Anonymous
Not applicable

Hello Gao,

 

Thank you for help and response. I tested the first code and it works, Thank you, but how to keep it percentage only in the red cicle? It repeats all the way to the end of table. How can manage it? 

poko_0-1727253726606.png

 

Anonymous
Not applicable

Hi @Anonymous ,

 

You can turn off text warp for the Column headers and Values, and then manually drag to adjust column widths to achieve the hiding effect.

vcgaomsft_0-1727255441630.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum 

Anonymous
Not applicable

I tried that above and it makes wider rows.... any solution for that?

poko_0-1727256910785.png

 

Anonymous
Not applicable

Hi @Anonymous ,

 

... turn off text warp for the Column headers and Values...

Please check if Text Wrap under Values is turned off.

 

Best Regards,
Gao

Community Support Team

Anonymous
Not applicable

Hello Gao,

 

Thank you, excellent work I turned off only for Column headers ..and not for Values.. now it works Thanks again.

 

Omid_Motamedise
Super User
Super User

Please provide the data of your example as a table here

If my answer helped solve your issue, please consider marking it as the accepted solution. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h
Anonymous
Not applicable

Would be easier to split "Case Column" into new columns ,create new columns for None, closed etc. for visualition and percenttige calculation? if so how can we do that?

dharmendars007
Super User
Super User

Hello @Anonymous , 

 

Can you please confirm the columns names you are referring to which is used to calculate the percentages, with the expected result..

 

And also to your point if we can calculate the percentages based on two tables ? Yes, we can do it.

 

If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

dharmendars007
Super User
Super User

Hello @Anonymous , 

 

Can you please confirm the columns names you are referring to which is used to calculate the percentages, with the expected result..

 

And also to your point if we can calculate the percentages based on two tables ? Yes, we can do it.

 

If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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 Kudoed Authors