cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anmolgan Member
Member

Best way to write a complex DAX

I am in the middle of writing a DAX that should pick one line item according to the filters and subtract the sum of that value from another column, and this should be done for each of the columns for example I have below:

 

COL A   COL B   COL C    COL D    COL E

IMA       FleetA      2.5         1.2        44

IMA       FleetB      2.5          1.4        23

IMA       FleetC      2.5          1.1        21

 

Now I want to subtract COL B value of COL C (After adding COL C and COL D for COL B) and then subtract from COL E for each of the items respectively for COL B. How can I write a DAX that should take care of this process and rather not me writing each of the DAX formula by filtering out each unit?

1 REPLY 1
leed Member
Member

Re: Best way to write a complex DAX

Hi @Anmolgan 

How about create a calculated column contains your formula and a measure that sum it up at the end?

Best,
DA

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors