Forum Discussion
Measure
Hi Guys,
Humbly asking for your help.
My current Matrix is like this:
Using this measure:
Section = SWITCH(SELECTEDVALUE(Level[Level#]),
1,[Percentage],
2, 0,
3, 0,1)
As expected, the resulting output Is this:
Is there a measure,
where only in Level 1 is 100%
and the rest (Level 2 and 3) is 0%.
Like this:
Thank You
ambillate , Try a measure like one of the two
Section =
var _1 = SWITCH(SELECTEDVALUE(Level[Level#]),
1,[Percentage],
2, 0,
3, 0,1)
return if(isblank(_1),1,_1)
Section =
var _1 = SWITCH(SELECTEDVALUE(Level[Level#]),
1,[Percentage],
2, 0,
3, 0,1)
return if(isblank(_1),if(max(Table[Lavel]) = 1,1,0),_1)
4 Replies
- amitchandakSuper User
ambillate , Try a measure like one of the two
Section =
var _1 = SWITCH(SELECTEDVALUE(Level[Level#]),
1,[Percentage],
2, 0,
3, 0,1)
return if(isblank(_1),1,_1)
Section =
var _1 = SWITCH(SELECTEDVALUE(Level[Level#]),
1,[Percentage],
2, 0,
3, 0,1)
return if(isblank(_1),if(max(Table[Lavel]) = 1,1,0),_1) - ambillateFrequent Visitor
Hi amitchandak,
I tried the two measures, but it gives me this result.
In Level 2 & 3 (column C), it's still 100%.
- amitchandakSuper User
ambillate ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- ambillateFrequent Visitor
Uhm, I think I still don't have permission to upload pbix file here:
Please see sample data:
Table1:
Table2:
Thanks for your help