Forum Discussion
help with switch(true)
- 5 years ago
Hi, summer18
According to your description and the sample picture, I can roughly understand your requirement, I think you can transform your DAX formula like this to achieve the result:
RESULT = SWITCH(TRUE(), 'Table'[Type]="Series",'Table'[Grade_Assignment], 'Table'[Type]="Movie" && 'Table'[Adviser]=BLANK() && 'Table'[Title] = "Beauty & the Beast",'Table'[Grade_Assignment], 'Table'[Type]="Songs" && 'Table'[Adviser]=BLANK() && 'Table'[Title] = "Baby Shark",'Table'[Grade_Assignment], 'Table'[Adviser] )And you can get what you want, like this:
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, summer18
According to your description and the sample picture, I can roughly understand your requirement, I think you can transform your DAX formula like this to achieve the result:
RESULT =
SWITCH(TRUE(),
'Table'[Type]="Series",'Table'[Grade_Assignment],
'Table'[Type]="Movie" && 'Table'[Adviser]=BLANK() && 'Table'[Title] = "Beauty & the Beast",'Table'[Grade_Assignment],
'Table'[Type]="Songs" && 'Table'[Adviser]=BLANK() && 'Table'[Title] = "Baby Shark",'Table'[Grade_Assignment],
'Table'[Adviser]
)
And you can get what you want, like this:
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- summer185 years ago
Helper III
Thank you v-robertq-msft