Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Inactivate relationship dax

Hi, 

 

I would like to inactivate a existing relationship for a measure with dax.
I have tried crossfilter and then set it to NONE but i does not seems to work, or even All to ignore the filter.

 

I need the relationship to be activ for other calculation.

 

 

  • Hi Anonymous 

     

    Try wrapping your exisiting code in an outer CALCULATE with the CROSSFILTER modifier.

    E.g.

    Measure =
    CALCULATE (
        ***Original Expression Here***,
        CROSSFILTER ( Table1[ID], Table2[ID], NONE )
    )

     

    This will ensure that your measure is calculated as if the relationship wasn't there.


    Best regards,

    Martyn

     

    If I answered your question, please help others by accepting it as a solution.

1 Reply

  • Hi Anonymous 

     

    Try wrapping your exisiting code in an outer CALCULATE with the CROSSFILTER modifier.

    E.g.

    Measure =
    CALCULATE (
        ***Original Expression Here***,
        CROSSFILTER ( Table1[ID], Table2[ID], NONE )
    )

     

    This will ensure that your measure is calculated as if the relationship wasn't there.


    Best regards,

    Martyn

     

    If I answered your question, please help others by accepting it as a solution.