cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CWmcl36
New Member

Dax Formula simplification

Hi All,

 

sorry if in the wrong topic area, but wondering if someone could help?

 

looking to simplify the following "working" measure 

 

Eliminations = -
(CALCULATE([Actuals INDY],'Finance Data','Finance Data'[ANAL_T5]="II")+CALCULATE([Actuals INDY],'Finance Data','Finance Data'[ANAL_T5]="IRL")+CALCULATE([Actuals INDY],'Finance Data','Finance Data'[ANAL_T5]="IML")+
CALCULATE([Actuals MRL],'Finance Data','Finance Data'[ANAL_T5]="II")+CALCULATE([Actuals MRL],'Finance Data','Finance Data'[ANAL_T5]="IRL")+CALCULATE([Actuals MRL],'Finance Data','Finance Data'[ANAL_T5]="IML")+
CALCULATE([Actuals MRU],'Finance Data','Finance Data'[ANAL_T5]="II")+CALCULATE([Actuals MRU],'Finance Data','Finance Data'[ANAL_T5]="IRL")+CALCULATE([Actuals MRU],'Finance Data','Finance Data'[ANAL_T5]="IML")+
CALCULATE([Actuals MTC],'Finance Data','Finance Data'[ANAL_T5]="II")+CALCULATE([Actuals MTC],'Finance Data','Finance Data'[ANAL_T5]="IRL")+CALCULATE([Actuals MTC],'Finance Data','Finance Data'[ANAL_T5]="IML"))

 

 

it does work as intended but seems to not be the best way to do it,

 

have tried looking on how to implement is or into the formula but coulnd see anything on search that fit the example 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @CWmcl36 ,

 

Try one of the following formulas:

 

Eliminations =
- CALCULATE (
    [Actuals INDY] + [Actuals MRL] + [Actuals MRU] + [Actuals MTC],
    'Finance Data',
    'Finance Data'[ANAL_T5] IN { "II", "IRL", "IML" }
)


Eliminations =
- (
    CALCULATE (
        [Actuals INDY],
        'Finance Data',
        'Finance Data'[ANAL_T5] IN { "II", "IRL", "IML" }
    )
        + CALCULATE (
            [Actuals MRL],
            'Finance Data',
            'Finance Data'[ANAL_T5] IN { "II", "IRL", "IML" }
        )
        + CALCULATE (
            [Actuals MRU],
            'Finance Data',
            'Finance Data'[ANAL_T5] IN { "II", "IRL", "IML" }
        )
        + CALCULATE (
            [Actuals MTC],
            'Finance Data',
            'Finance Data'[ANAL_T5] IN { "II", "IRL", "IML" }
        )
)

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @CWmcl36 ,

 

Try one of the following formulas:

 

Eliminations =
- CALCULATE (
    [Actuals INDY] + [Actuals MRL] + [Actuals MRU] + [Actuals MTC],
    'Finance Data',
    'Finance Data'[ANAL_T5] IN { "II", "IRL", "IML" }
)


Eliminations =
- (
    CALCULATE (
        [Actuals INDY],
        'Finance Data',
        'Finance Data'[ANAL_T5] IN { "II", "IRL", "IML" }
    )
        + CALCULATE (
            [Actuals MRL],
            'Finance Data',
            'Finance Data'[ANAL_T5] IN { "II", "IRL", "IML" }
        )
        + CALCULATE (
            [Actuals MRU],
            'Finance Data',
            'Finance Data'[ANAL_T5] IN { "II", "IRL", "IML" }
        )
        + CALCULATE (
            [Actuals MTC],
            'Finance Data',
            'Finance Data'[ANAL_T5] IN { "II", "IRL", "IML" }
        )
)

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks you so much used the first, ad now looking into the IN { 

Helpful resources

Announcements
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.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors
Top Kudoed Authors