The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
AND (CASE
WHEN column1='New Lease' then column2
WHEN column1='Move-out' then column3
WHEN column1='Renewal' then column4
end ) > 0
How can I convert it into a DAX measure?
Solved! Go to Solution.
Hey,
you can use Switch for this scneraio :
https://community.powerbi.com/t5/Desktop/CASE-Statement-to-DAX/m-p/185548
Hi @Anonymous ,
The "CASE WHEN" in SQL is similar to SWITCH() in DAX.
The measure can be created like
SWITCH(MAX('tablename'[column1]), "New Lease", MAX('tablename'[column2]),"Move-out", MAX('tablename'[column3]), "Renewal", MAX('tablename'[column4]))
SWITCH function (DAX) - DAX | Microsoft Docs
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
You could use nested IF or Switch function in Dax based on your scenario
Hey,
you can use Switch for this scneraio :
https://community.powerbi.com/t5/Desktop/CASE-Statement-to-DAX/m-p/185548