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.
Hi Guys,
In my report the requirement is I need to get sum of weeks based on selected month but the twist is I need to get next month sum of weeks.
for e.g. If user selected May from Month filter it needs to show data for Jun and if user select Jun in month filter it needs to show July data etc.
Below is my DAX
Solved! Go to Solution.
Hi @Anonymous
The first thing to note is you'll have a problem if the user selects December. Your logic to add 1 to the month number (MonthOfYear) will give you month 13.
DAX has a function called DATEADD which is commonly used in scenarios like this.
Something like:
SelectedMonth + 1 =
CALCULATE(
SUM(ListingDelays_Response_Updated[Number of weeks]),
DATEADD('Date', 1, MONTH)
)
Hi @Anonymous
The first thing to note is you'll have a problem if the user selects December. Your logic to add 1 to the month number (MonthOfYear) will give you month 13.
DAX has a function called DATEADD which is commonly used in scenarios like this.
Something like:
SelectedMonth + 1 =
CALCULATE(
SUM(ListingDelays_Response_Updated[Number of weeks]),
DATEADD('Date', 1, MONTH)
)
Hi PaulOlding,
Thanks for this, DateADD actually really helped.
Best Regards,
Thanks
User | Count |
---|---|
48 | |
44 | |
19 | |
14 | |
14 |
User | Count |
---|---|
107 | |
57 | |
29 | |
20 | |
16 |