Forum Discussion
if then else
- 9 years ago
Cool my dear friend.
We can do anything in DAX cool.
Try this,
Measure =
Switch ( True(),
condition1,"Result1" ,
condition1,"Result1" ,
etc... )
let me if any help in DAX.
Cool my dear friend.
We can do anything in DAX cool.
Try this,
Measure =
Switch ( True(),
condition1,"Result1" ,
condition1,"Result1" ,
etc... )
let me if any help in DAX.
Measure = Switch ( True(), condition1,"Result1" , condition1,"Result1" , etc... )
Yaas! Great shout on Switch()! I don't think I need need the True() function here tho, the Switch() function seems to take care of everything:
SWITCH(<expression>, <value>, <result>[, <value>, <result>]…[, <else>])
Also cheers for pointing out difference between DAX and M. Here's a link that describe the difference in more detail:
Essentially:
First you use M to query data sources, clean and load data. Then you use DAX to analyze & visualise the data in Power BI.
- MarcelBeug9 years agoCommunity Champion
So as a rule of thumb: :smileylol:
if extract then M if transform then (if not aggregate then M else DAX) else DAX