Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Hi,
I have added a column as part of my calendar date table that calculates calendar "Weeks from today", please see DAX below :
Solved! Go to Solution.
Hi @Peppearson ,
Is that you want something like this gif shows?
Please refer the pbix file in the end.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, thanks for the reply.
This isn't quite what I had in mind - my solution needs to show the date diff from the current date from any data in the past/future.
I've actually received a working solution from stack overflow. The title of the post is Date Diff Calculating Incorrectly When Refreshed On Sunday - https://stackoverflow.com/questions/73335573/date-diff-calculating-incorrectly-when-refreshed-on-sun....
@Peppearson , move both to Sunday or Monday and then try
Weeks From Today 2 =
VAR _date= WEEKDAY('Calendar_Table'[Date],2)
VAR _today= WEEKDAY(Today,2)
RETURN
quotient(datediff(_date,_today,day),7)
Thank you for your response.
Just to clarify:
VAR _date= WEEKDAY('Calendar_Table'[Date],2) Returns the day number i.e. if the calendar date is a monday it would return 1.
VAR _today= WEEKDAY(Today,2) Returns the day number - Same as above but returns day number for today() function so for today it'd return 5
RETURN
quotient(datediff(_date,_today,day),7) - Returns the remainder of division of the result of date diff/7
As far as I can tell this would not return the "weeks from today" for the calendar dates?
Hi @Peppearson ,
Is that you want something like this gif shows?
Please refer the pbix file in the end.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, thanks for the reply.
This isn't quite what I had in mind - my solution needs to show the date diff from the current date from any data in the past/future.
I've actually received a working solution from stack overflow. The title of the post is Date Diff Calculating Incorrectly When Refreshed On Sunday - https://stackoverflow.com/questions/73335573/date-diff-calculating-incorrectly-when-refreshed-on-sun....
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 50 | |
| 44 | |
| 44 | |
| 19 | |
| 19 |
| User | Count |
|---|---|
| 71 | |
| 70 | |
| 34 | |
| 33 | |
| 31 |