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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
PBI_Chris67
New Member

How to calculate a % of achievement between two columns in a single table?

Hello,

 

I am new on the forum and would be very gratefull if some of you could tell me how to do something as simple a the calculation of a % of achievement between two columns from a single database.

 

So far, I just create a first column calcuating the difference between Column A & Column B, et's call it Call it Column C

And than I created another column with Column C / by Colonne A but the result is not accurate...

 

Thanks for your help !

 

 

 

 

2 REPLIES 2
JordanAWARE
Frequent Visitor

There is a chance you could be getting negative values which would definately cause some issues

 

try this:

 

Column C = Column A - Column B (like you already have)

New Percentage column = ABS(Column C) / Column A

 

then format this new column to be a percentage

 

If column B was larger than column A the number would be negative so ABS() gets the absolute value (ignores negatives) so that result in Column C will always be the difference between A and B

 

Greg_Deckler
Super User
Super User

Can you post some sample data and what you expect as a result?


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors