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
BruCe05
New Member

Help calculating percentages for a graph

Hello everyone, 

 

If you could kindly help me figure our how to fix my problem, I would greatly appreaciate it!

 

What I'm trying to do is this:

I have 4 columns Date, Calls, Sales, %.

The % column is just Sales Divided by Calls. I'm managed to do this calculation on Power Bi for the sheet in the data section, so I would get results that look like this:

BruCe05_0-1658427120808.png

 

What I need to do now, is to create 3 graphs, one for the total calls divided per day, one for the total sales divided per day and one for the total % divided per day. The Calls and Sales graphs I managed to do with no issue as the system only sums every value for a single column for each day. But for the % graph instead of this:

BruCe05_1-1658427323822.png

 

I'm also getting the sum of each % value for the day:

BruCe05_2-1658427529802.png

What I needed was that the resulting value would be the result between all sales of a day, divided by all calls of that day. 

I've searched for topics regarding this issue, but couldn't find it. Please let me know if anyone has already explained the solution.

 

Best regards to all and thanks in advance for your time!

1 ACCEPTED SOLUTION

Hi @BruCe05 

 

Please create a measure instead of a calculated column. This is more recommendable. 

 

Percent = DIVIDE(SUM('Table'[sales]),SUM('Table'[calls]))

 

vjingzhang_0-1658831418859.png

 

If you want to have it in a calculated column, try below DAX

% = DIVIDE(CALCULATE(SUM('Table'[sales]),ALLEXCEPT('Table','Table'[Date])),CALCULATE(SUM('Table'[calls]),ALLEXCEPT('Table','Table'[Date])))

vjingzhang_0-1658831846675.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

4 REPLIES 4
BruCe05
New Member

Thank you @v-jingzhang this solution did the trick!

Best regards!

amitchandak
Super User
Super User

@BruCe05 , You have two option

 

% = Divide(sum(Table[Call]), Sum(Table[Sales]))

 

or

 

% 1 = sumx(values(table[Day]), Divide(sum(Table[Call]), Sum(Table[Sales]))  )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak thank you for your message!

Sadly it didn't work. For both solutions, all lines in the calculated column returns the same value.

 

I hoped that it was just a displaying option for the graph, but from your reply I assumed it will need to be a differente formula, right? In this case is maybe an equivalent to Excel's sumifs possible? What do you think?

 

 

Hi @BruCe05 

 

Please create a measure instead of a calculated column. This is more recommendable. 

 

Percent = DIVIDE(SUM('Table'[sales]),SUM('Table'[calls]))

 

vjingzhang_0-1658831418859.png

 

If you want to have it in a calculated column, try below DAX

% = DIVIDE(CALCULATE(SUM('Table'[sales]),ALLEXCEPT('Table','Table'[Date])),CALCULATE(SUM('Table'[calls]),ALLEXCEPT('Table','Table'[Date])))

vjingzhang_0-1658831846675.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

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.