Forum Discussion
need help with DAX
- 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
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