Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
I have multiple pages that require month-slicers that automatically select the previous months. So when I select March, then January en February should be selected automatically as well. Can anyone help me how to do this?
Gr. Steven
Solved! Go to Solution.
Hi @smogie ,
I believe you need to have a disconected date table.
Check this file: Download PBIX
Also it's possible to create a what-if parameter, so you can select the number of months dynamically.
If you consider it as a solution, please mark as a solution and kudos.
Ricardo
Hi @smogie ,
Do you need to show the previous months name or just add the values from them ?
Ricardo
Hi @camargos88 ,
The whole page must add the values and/or show months separately. For example the graph shows only January but when I click on the slicer on the month June, then the graph shows January - June (so all the data for each month) in a different column or row.
Steven
Hi @smogie ,
I believe you need to have a disconected date table.
Check this file: Download PBIX
Also it's possible to create a what-if parameter, so you can select the number of months dynamically.
If you consider it as a solution, please mark as a solution and kudos.
Ricardo
Nor clear after the second update. But these can help
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
Rolling 6 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-6,MONTH))