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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
troystyle
Regular Visitor

Help with DAX calculation( addition and division)

I am relatively new to PowerBI and though i have created many dashboards and reports, i need help in creatiing this dax calculations in a report i am working on, i have tried several calculations and was getting the wrong results

 

I have two columns of data which looks as follows: 

 ParticipantsAB
 100
 425
 3120
 344
 600
 700
 1220
 341
 401
 921
 110
 133
 011
Total543116

 

The goal is to create a calculation ( measures or column)  with the following intent:

1. Add the totals of columns A &B , divide the sum of columns A&B by the total of column Participants and then convert the result into a percentage i.e  (31+16)/54 with results converted to percentage.

Any help will be appreciated with regards to the dax calcuation

Thanks
 

 

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

5 REPLIES 5
Sean
Community Champion
Community Champion

@troystyle Here you go...

Participants.png

Rommel
Frequent Visitor

Muchas gracias , me sirvio tambien a mi.

Sean

Immense thanks

I am focused on training myself on dax calculations, seeing that you are quite versed.

What are the best resources out there to get a new beginner like myself up to speed.

Thanks

Sean
Community Champion
Community Champion

http://www.sqlbi.com/ AND http://www.powerpivotpro.com/

 

Both are great AND both have published great books! 

 

I had been searching for a similar solution for about a week now.  and had found that division was only returning the numerator in anything i was trying.

 

=DIVIDE(numerator, denominator, optional case)    this lead me to believe that optional case was in fact optional and that it wasnt necessary.  But to do a proper calculation without the divide by zero case.. it needs that ,0 option.

 

with scalars not of the data set i tried =DIVIDE(25,33)  hoping that it would yield .75  and i was getting it to yield the numerator in return.  I had tried with sums of the columns i was using etc.  but i believe the appropriate thing here is that ,0 optional... if you do not need anything else in your operands that you should include the ,0 in the division formula....      as such   = [numerator] / [denominator]   will not yield the same result  as =DIVIDE([numerator], [denominator],0)    

 

so many SUM and SUMX and COUNTX and CALCULATE custom formulas wasted - it was a learning process though.

 

Thanks again for posing the question and providing the answer... now on to more difficult tasks.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.