Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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 visualization with 3 levels Var. dim 1, Var. dim 2, Var. dim 3 and value - TEST (calculated measure), and three slicers Var. dim 1, Var. dim 2, Var. dim 3.
I need to create a measure which will give result when selected Var. dim 1 = 'FP-MKD' then result TEST for 1st level should be blank, otherwise TEST value, if selected Var. dim 2 'FP-MKD' (but different Var. dim 1 and Var. dim 3), then for 1st level "Var. dim 1" result = TEST value but if person Expand second level he will still see result for the first level, but for the second level "Var. dim 1"result will be blank. The same for the third level. If Var. dim 1 <>'FP-MKD' , Var. dim 2 <>'FP-MKD' but Var. dim 3 = 'FP-MKD' Then TEST will be shown for the first level, second level, but third level will be blank.
I've tried different ways, but it didn't give correct resuld. It eather blank everything or shows everything. Example
that's fine. But when I expand for the second level, it should be blank, but still shows me some numbers:
I want something like this
1st level (Var. dim 1 ='FP-MKD', Var. dim 2 <>'FP-MKD', Var. dim 3 <>'FP-MKD')
2nd level (Var. dim 1 <>'FP-MKD', Var. dim 2 ='FP-MKD', Var. dim 3 <>'FP-MKD' )
3rd level (Var. dim 1 <>'FP-MKD', Var. dim 2 <> FP-MKD', Var. dim 3 = 'FP-MKD' )
I've tried different ways, but it doesn't work. For SELECTEDVALUE I had to use Parameter field column "'Var. Dims 1'[Var. Dims 1 Felder]" because it hadn't allowe me to use "'Var. Dims 1'[Var. Dims 1]" column which Iuse in visulaizations.
4 examples of my measures 😂
PLEASE can anybody help me with this?
Solved! Go to Solution.
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.