The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
32 | |
20 | |
17 | |
15 |
User | Count |
---|---|
56 | |
31 | |
30 | |
24 | |
21 |