Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Solved! Go to Solution.
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 crm@inogic.com
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/
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 crm@inogic.com
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/
Thanks @SamInogic for your perfect DAX code, need to learn from you guys.
Thanks @amitchandak for your quick response, I always tag your name when I struck in DAX and you help me couple of times.
Thanks again both of you @SamInogic @amitchandak
@BalaKiranM , what are you trying to do there.
In case you need week start or end date
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Any Weekday Week - Start From Any day of Week
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...
https://medium.com/chandakamit/cheat-sheet-any-weekdays-week-start-date-just-one-variable-apart-6b2e...
The information you have provided is not making the problem clear to me. Can you please explain with an example.
Appreciate your Kudos.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |