Forum Discussion

Michael_Gold's avatar
Michael_Gold
Frequent Visitor
4 years ago
Solved

CALCULATED TABLE EXPRESSION AS OUTPUT OF A CONDITIONAL STATEMENT

Hello,

 

I am trying to create a dynamic measure or a dynamic table that returns a list of values (based on selection of a parameter)

I wanted to know if there is a way a conditional statement such as IF, SWITCH-TRUE Combo can produce such an output?

 

An example for what I was trying to do:

(Engine value is a parameter for the number of engine)

 

Engine_missing_parts =

 

VAR MISSING_PARTS =

SWITCH( TRUE(),

Engine[Engine Value] = 1, CALCULATETABLE(SELECTCOLUMNS(FILTER ... ,

Engine[Engine Value] = 2, CALCULATETABLE(SELECTCOLUMNS(FILTER ... ,

etc

 

RETURN MISSING_PARTS

  • Hi Michael_Gold ,

    According to your description, we can't create a dynamic table or column changed by the parameter value, it's by design. Calculated table and column can only be computed during data refresh, it does not depend on user interaction in the report. You can refer to this blog for in-depth understanding.

    However, we can create a dynamic measure based on the parameter value, I create a sample.

    The measure dynamically varies with the parameter value.

    I attach my sample below for reference.

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

1 Reply

  • Hi Michael_Gold ,

    According to your description, we can't create a dynamic table or column changed by the parameter value, it's by design. Calculated table and column can only be computed during data refresh, it does not depend on user interaction in the report. You can refer to this blog for in-depth understanding.

    However, we can create a dynamic measure based on the parameter value, I create a sample.

    The measure dynamically varies with the parameter value.

    I attach my sample below for reference.

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.