Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have a data set and need to always calculate total hours for this week and previous week by refreshing the SQL data. I have used current week offset on my Calendar to get sum of this week and previous week using calculate function. Calculate([hours],'calendar', [curweekoffset]=0) what I need is the total sum of hours from inception to current week and previous week.
Thank you in anticipation.
Solved! Go to Solution.
Hi @OntheDAXside ,
To get the total sum of hours from inception to the current week and previous week, you can modify your existing formula to include an additional filter condition that selects all weeks up to and including the current week and the previous week. Here's an example of how you can modify your formula:
Calculate([hours],'calendar', [curweekoffset]<=0 && [curweekoffset]>=-1)
This will calculate the sum of hours for all weeks where the current week offset is less than or equal to 0 ( the current week and all previous weeks) and greater than or equal to -1 (i.e., the previous week).
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @OntheDAXside ,
To get the total sum of hours from inception to the current week and previous week, you can modify your existing formula to include an additional filter condition that selects all weeks up to and including the current week and the previous week. Here's an example of how you can modify your formula:
Calculate([hours],'calendar', [curweekoffset]<=0 && [curweekoffset]>=-1)
This will calculate the sum of hours for all weeks where the current week offset is less than or equal to 0 ( the current week and all previous weeks) and greater than or equal to -1 (i.e., the previous week).
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
87 | |
84 | |
67 | |
62 | |
57 |
User | Count |
---|---|
138 | |
112 | |
94 | |
82 | |
71 |