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.
Update.
'If then else' is possible in Power BI, but not using freehand DAX. It only seems to be available using menus, like so:
Go to Edit Queries
Then Add Column -> Conditional Column
Et voila.... your if then else statements are available...
I'm still not sure why you can't just type these freehand in the DAX editor to save you all that menu work.
- MarcelBeug9 years agoCommunity Champion
B_Real when editing queries you are not in the DAX environment, but in M (a.k.a. Power Query).
These are completely different: Power Query is aimed at getting and transforming data into tables, while DAX is mainly focussed on aggregating data into measures.
However, some tasks can be done in both environments and both environments reside in Power BI..