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
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!