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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lcasey
Post Prodigy
Post Prodigy

Percentage of Revenue Calculation - Is DAX broken?

Does anyone know how to calculate percentage of Revenue? It seems that Nothing will work.

 

The % of Grand Total  doesnt work and I simply need to calculate what percentage of my amount is the percentage of revenue.

 

I have a measure for amount:

 

Amount = IF(SUM('00-GLSummary'[Revenue]) > 0,[Credit] - [Debit],[Debit] - [Credit])

 

I simply want to calculate what percentage of each expense item and revenue item are what percent of revenue?

 

This measure works perfectly, but I have to HARD code the Revenue amount into the measure:

 

% of Revenue = DIVIDE([Amount],4634130,0)

 

 

 

01.jpg

 

 

 

4 REPLIES 4
MarkS
Resolver IV
Resolver IV

I think that what you need here is a measure that will calculate the total Revenue to use for your percentage measure.

 

Something like Total Revenue=CALCULATE([Amount],ALL(Table1),Table1[PLTYPE]="Revenue"

 

 Then Percent of Total Revenue =DIVIDE([Amount],[Total Revenue])

Casteless
Helper I
Helper I

Use a variable?

something like:

 

measure=

var revenue = calculate(sum([revenue]))

 

return DIVIDE([Amount],revenue)

 

You might have to mess with the filters in the caclulate though, I'm not sure of your structure.

 

cheers,

What table/column make up your hardcoded value of 4634130?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hello,

 

The value is constantly changing.  It is  the total revenue or sales which changes all the time.

 

Nothing is working, I have tried all suggestions and it seems Power BI simply cant handle a fundamental  calculation like this.

 

Ohh well, maybee one day such easy calculations will be available to the Power BI tool.  As of now after 24 hours of testing every single possible formul;a and filter, It appears that the Power BI DAX engine is simply broken.

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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