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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply

Need help on DAX calculation using distinct value from one column

Right now, I have data structured in a way where a value is repeated several times for each name.

 

However, for a calculation, I only need it the one time. My current calculation works when PowerBI is filtering for each name, but for consolidation purposes it is wrong.

 

NameGroupTypeYearValueEBITREVMultiplier
AnAApples                                                        1                                           1,005.001000020001.03
AnAApples                                                        2                                           2,378.63

10

000

20001.0609
AnAApples                                                        3                                              603.001000020001.092727
AnAApples                                                        4                                           1,237.261000020001.12550881
AbcAApples                                                        1                                              585.00300050001.03
AbcAApples                                                        2                                           1,219.86300050001.0609
AbcAApples                                                        3                                              516.25300050001.092727
AbcAApples                                                        4                                           1,122.66300050001.12550881

 

What I would like to show is the following set for the data each line when filtered,

EBIT % = Value (for the yr) / EBIT (per property) x Multiplier (for the year)

 1234
An10%25%7%14%
ABC20%43%19%42%

 

And when consolidated to show the following 

 1234
TOTAL13%29%9%20%

 

Right now, my measure is the following :

 

DIVIDE(
SUM('Table'[Value]), AVERAGE('Table'[EBIT])
*SUM('Table'[Multiplier])

 

However, the average for EBIT is wrong when I do the consolidated total.

 

Just wondering if there are way to go about it. TIA!

1 ACCEPTED SOLUTION

This definitely helped point me in the right direction.

 

I ended up switching the formula to the following and it looks like it's working

 SUMX(DISTINCT('Table'[Name]), CALCULATE(MAX('Table'[EBIT])))
 
Thank you so much!!!😊

View solution in original post

2 REPLIES 2

This definitely helped point me in the right direction.

 

I ended up switching the formula to the following and it looks like it's working

 SUMX(DISTINCT('Table'[Name]), CALCULATE(MAX('Table'[EBIT])))
 
Thank you so much!!!😊
freginier
Super User
Super User

Hey there!

 

using AVERAGE which might not be the correct way to handle EBIT because it can be affected by row duplication. This leads to incorrect consolidated totals.

try using this:

 

EBIT % =
DIVIDE(
SUM('Table'[Value]),
SUMX(DISTINCT('Table'[Year]), CALCULATE(SUM('Table'[EBIT])))
) * SUM('Table'[Multiplier])

 

Hope this helps!

😁😁

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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