Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

DAX help with IF statement

Experts, please help me to convert the below SAP BI syntax in DAX. amitchandak 

 

=If(DayNumberOfWeek([Applydate])<>7;RelativeDate([Applydate];(1-DayNumberOfWeek([Applydate]))+6);[Applydate])

 

 

Thanks,

Bala

  • Hi,

    The conversion for your “=If(DayNumberOfWeek([Applydate])<>7;RelativeDate([Applydate];(1-DayNumberOfWeek([Applydate]))+6);[Applydate])" expression in DAX expression will be as follows:

    ConvertedDate = If(WEEKDAY([Applydate])<>7, DATEADD([Applydate], (1-WEEKDAY([Applydate]))+6,DAY), [Applydate])

    Please refer to the below screenshot for the same.

    If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.

    Thanks!

    Inogic Professional Services

    An expert technical extension for your techno-functional business needs

    Power Platform/Dynamics 365 CRM

    Drop and email at [email protected]

    Service:  http://www.inogic.com/services/  

    Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

3 Replies