Forum Discussion
How to convert IF statement from SQL to DAX
Hi everyone,
I have a SQL query like this:
Total = Sum ( case
when is_weekday = 'Y'
and
(
(is_com_holiday = 'N')
or (is_US_holiday = 'N')
or (is_customer_holiday = 'N')
)
then 1
else 0
end )
from dbo.date d
join dbo.Maintable m
on fulldate >= SaleDate and fulldate <= create_date
Can someone please help me how to convert the query abow to DAX.
Thank you!
1 Reply
- lbendlinSuper User
That seems to be straightforward. Use && and || and IN () . What have you tried and where are you stuck?