Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Nested Calculate

Afternoon,

 

We are currently experiencing a performance issue with the following pattern. Specifically for this test we are looking at the Net Sales TY measure (which enforces DRY programming principles), evualuated in the context of item_long_name (an item name descriptor from a joined table).

 

Unfortunatly, when evaluating we get significant slowdowns.

 

 

In order to remedy, we tested a measure as below, which in violation of DRY programming principles (WET).

 

 

Is there another way to write the DAX to appropriately evaluate in context, and still maintain DRY?

 

 

I'll post more query plans and server timings, if this gains traction.

 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi

     

    I would recommend a couple of options:

    A. Replace the table filters for column filters

    B. For those where you need the table filter such as (date) , specified the actual column in your filter:  

     

    If I answer your question, please mark my post as a solution, this will also help others.
    Please give Kudos for support.

     

    Tomas Santandreu Polanco |Principal Business Intelligence Consultant
    www.designmind.com