Našimi kurzy prošlo více než 10 000+ účastníků
2 392 ověřených referencí účastníků našich kurzů. Přesvědčte se sami
Most users usually are not big fans of writing of complex logical functions, neither in excel formulas nor in DAX.
In both situations we can use the IF function when choosing from two options. In Excel formulas, nowadays, is the IFS function. It enables us to simply write condition – result – condition – result – condition – result etc., with no necessity to nest the IF functions.
Unfortunately, there is no IFS in DAX. However, we can simply use SWITCH to do something identical.
How to do it?
For example here we are looking for red Alfa Romeo and silver expensive Opel.
For multiple criterias in DAX you can use the AND or OR functions (that only handle up to 2 conditions), or operators like && or ||.
You can write formula like this and it works:
but it becomes too complex and unclear if there are more IFs.
Instead of multiple IFS functions, we can use SWITCH:
With SWITCH we can simply keep the logic condition – result – condition – result etc.
2 392 ověřených referencí účastníků našich kurzů. Přesvědčte se sami
Pište kdykoliv. Odpovíme do 24h
© exceltown.com / 2006 - 2023 Vyrobilo studio bARTvisions s.r.o.