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.
My dates in my data are 1/1/2015, 2/1/2015, 3/1/2015........12/1/2017.
I want to create a chart that will show me the last six months of data, and when the next months roll around, it will automatically adjust and get 6 months of data from the updated month.
I have a column called "MaxMonth" that will always output the most most recent month,
I have a measure that will retrieve the last 6 months worth of data, using my "MaxMonth" as the starting point.
6Months = CALCULATE(SUM(Value),DATEADD(Date[MaxDate], -6,Month))
I expected this to give me what I need, but it did not.
What went wrong?
Solved! Go to Solution.
If want to calculate running total for last 6 month, you should use function DATESINPERIOD, instead of DATESADD (it will give you value for 6 month ago).
Try this measure:
6Months = CALCULATE(SUM(Value), DATESINPERIOD(Date[Date], -6, MONTH)).
Please make sure you have a Date table in your model. Without that Time intelligence function will not work.
I have the similar query,
Is there anyone know how I can dynamically select last 6 month or 3 months value to make a trend line. It is posible in excel by offset formula but here need exparts help.
Thanks in advance for your answers.
If want to calculate running total for last 6 month, you should use function DATESINPERIOD, instead of DATESADD (it will give you value for 6 month ago).
Try this measure:
6Months = CALCULATE(SUM(Value), DATESINPERIOD(Date[Date], -6, MONTH)).
Please make sure you have a Date table in your model. Without that Time intelligence function will not work.
Above solution wont work as of 2022.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
90 | |
89 | |
79 | |
70 | |
68 |
User | Count |
---|---|
226 | |
129 | |
120 | |
84 | |
78 |