cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
oolamide85
Frequent Visitor

SUM AND SUBTRACT

I would like to sum two columns salary and other overheads column then subtract gross profit from it . Below is my formula 

 

EBITDA = ('Fin 2'[SalarY]+'Fin 2'[Other overheads])-'Fin 2'[Gross Porif]

 

Is there a better way to do this as am new to Dax

 

Thanks.

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @oolamide85,

 

I made one sample for your reference. The first one is the same as yours. For the second one, it will ignore all the filter.

 

Measure = CALCULATE(SUM('Fin 2'[SalarY])+CALCULATE(SUM('Fin 2'[Other overheads])-CALCULATE(SUM('Fin 2'[Gross Porif]))))

 

all = CALCULATE(SUM('Fin 2'[SalarY]),ALL('Fin 2'))+CALCULATE(SUM('Fin 2'[Other overheads]),ALL('Fin 2'))-CALCULATE(SUM('Fin 2'[Gross Porif]),ALL('Fin 2'))

Also you can get more details from the attachment. If any other question, feel free to let me know please.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

 

One cannot refer to bare columns when writing measures.  Try this measure

 

EBITDA = SUM('Fin 2'[SalarY]+'Fin 2'[Other overheads]-'Fin 2'[Gross Porif])


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-frfei-msft
Community Support
Community Support

Hi @oolamide85,

 

I made one sample for your reference. The first one is the same as yours. For the second one, it will ignore all the filter.

 

Measure = CALCULATE(SUM('Fin 2'[SalarY])+CALCULATE(SUM('Fin 2'[Other overheads])-CALCULATE(SUM('Fin 2'[Gross Porif]))))

 

all = CALCULATE(SUM('Fin 2'[SalarY]),ALL('Fin 2'))+CALCULATE(SUM('Fin 2'[Other overheads]),ALL('Fin 2'))-CALCULATE(SUM('Fin 2'[Gross Porif]),ALL('Fin 2'))

Also you can get more details from the attachment. If any other question, feel free to let me know please.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors