cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Trist
Frequent Visitor

Case when in dax

Hi Everybody,
ı have question about case when statement in power bi. how to write below case when sql statement
in power bi?

SQL STATEMENT:

CASE WHEN D.DATEDIFFERENCE >= 0 AND D.SHKZG = 'S' THEN D.WRBTR * C.ExchangeRateValue_USD
      WHEN D.DATEDIFFERENCE >= 0) AND SHKZG = 'H' THEN D.WRBTR * C.ExchangeRateValue_USD * -1
      ELSE 0 END [Overdue (USD)]

Thanks,

1 REPLY 1
ERD
Super User
Super User

Hello @Trist ,

There is a SWITCH function in DAX: SWITCH DAX Function.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.