cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

percentage total

Hi

I am new to Power BI and found this community to be very informative.

 

I have a table that displays sales by sales person for a specific time

the problem is that when i display tge margin % i f i don't turn off "sum" the values arre incorrect, but with turned off the total line of the report does not display the overall margin %.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: percentage total

I hate to say this without a firm solution, but that is probably your issue with the totals. I noticed this in my Ohio State Football Wins %. The solution was to move the calculation to a Measure and then the totals were correct. I'd have to know a little more about your data to give you a 100% solution, the way that I did my win percentage calculation in my Ohio State Football report was:

 

Winning % = SUM([Wins]) / (SUM([Wins]) + SUM([Losses]) + SUM([Ties]))

Then, the context of the visual would calculate things out correctly. For example, I could put this in a matrix along with Coach and Year and all of the individual rows would be correct as well as all of the totals.


---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Highlighted
Super User IV
Super User IV

Re: percentage total

How are you doing your margin %, is it a calculated column or a measure?


---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Frequent Visitor

Re: percentage total

hi i have it as a column with the follwing formula

Margin % = ('posted sales trans_ (2)'[Margin $ (LCY)]/' posted sales trans_ (2)'[Sales (LCY)])*100

Highlighted
Frequent Visitor

Re: percentage total

Hi

I got the margin calculation to work with the following measure

 

Margin % = sum ('posted sales trans_ (2)'[Margin $ (LCY)]/ sum(' posted sales trans_ (2)'[Sales (LCY)])*100

 

this has given the correct margin calculation on the total row of a table.

Highlighted
Super User IV
Super User IV

Re: percentage total

I hate to say this without a firm solution, but that is probably your issue with the totals. I noticed this in my Ohio State Football Wins %. The solution was to move the calculation to a Measure and then the totals were correct. I'd have to know a little more about your data to give you a 100% solution, the way that I did my win percentage calculation in my Ohio State Football report was:

 

Winning % = SUM([Wins]) / (SUM([Wins]) + SUM([Losses]) + SUM([Ties]))

Then, the context of the visual would calculate things out correctly. For example, I could put this in a matrix along with Coach and Year and all of the individual rows would be correct as well as all of the totals.


---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Helpful resources

Announcements
Super Users of the Quarter - Q2 2020

Super Users of the Quarter - Q2 2020

Who are our Super User Superstars? Who made it to the top of the leaderboards? Get the answers!

June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Kudoed Authors