Forum Discussion

perviiri's avatar
perviiri
New Member
2 years ago
Solved

need help with DAX

Hi, I need help with DAX.  I'm connected to LIVE datasource. Where I have three Variable dimension (Var. dim 1, Var. dim 2, Var. dim 3) which were created by Parameters fields. I have matrix ...
  • perviiri's avatar
    2 years ago

    I found a solution. In case it would help anybody, here are 2 ways: _resulteTESTNEW and test12:

    test EOH =

    VAR selected_dim1 = SELECTEDVALUE('Var. Dims 1'[Var. Dims 1 Felder])

    VAR selected_dim2 = SELECTEDVALUE('Var. Dims 2'[Var. Dims 2 Felder])

    VAR selected_dim3 = SELECTEDVALUE('Var. Dims 3'[Var. Dims 3 Felder])

     

    var _resultTESTNEW = IF(((selected_dim3 = "'Full Price Flag'[Full Price Flag Description]"||

                selected_dim2 = "'Full Price Flag'[Full Price Flag Description]"||

                selected_dim1 = "'Full Price Flag'[Full Price Flag Description]")&&ISINSCOPE('Full Price Flag'[Full Price Flag Description]))||

                ((selected_dim3 = "'Full Price Flag'[Full Price_Markdown Flag]"||

                selected_dim2 = "'Full Price Flag'[Full Price_Markdown Flag]"||

                selected_dim1 = "'Full Price Flag'[Full Price_Markdown Flag]")&&ISINSCOPE('Full Price Flag'[Full Price_Markdown Flag])),"",[EOH])

     

    VAR test12=

                   IF((SUMX( 'Var. Dims 1', [Var. Dims 1 Reihenfolge] ) in { 9, 10 }  || SUMX( 'Var. Dims 2', [Var. Dims 2 Reihenfolge] ) in { 9, 10 }  || SUMX( 'Var. Dims 3', [Var. Dims 3 Reihenfolge] ) in { 9, 10 })&&(ISINSCOPE('Full Price Flag'[Full Price Flag Description])||ISINSCOPE('Full Price Flag'[Full Price_Markdown Flag]))

             ,"",

    [EOH])

     

     

    RETURN test12