Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have this dynamic date selection on my dashboard in order to see the results (from a measure) aggregated by day, week, and month (pictures below).
To make this dynamic visual, I created the table below with all 3 groups of data in union. It is related to the calendar by day, and for the Weekly visual it takes the first day of the week, and for the month, the first day of the month.
Now I want to create 2 new visuals, but I don't know how to do it:
1 - Show the max date for the selected type
2 - Show the previous date for the selected type
And it should change dynamicaly if I select another date on the chart
If I can create this 2 visuals, I can add a measure to compare both values and give me the delta to the previous value daily, weekly, monthly.
Sorry for the bad English and for the screenshots in Portuguese.
Solved! Go to Solution.
Hi , @vfernandes
According to your description, you want to get the current and previous date in the measure.
For your need , i think you can make your table max date as TODAY().
Here are the steps you can refer to .
This is my test data:
We can create two measures like this:
First Need =
MAX('Table'[Visual Date])
Second Need = var _slicer =MAX('Table'[Type])
return
IF(_slicer = "Daily" , [First Need]-1 ,IF(_slicer="Monthly" , EOMONTH([First Need],-2)+1 ,[First Need]-7))
Then we can get the date when you change the slicer.
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @vfernandes
According to your description, you want to get the current and previous date in the measure.
For your need , i think you can make your table max date as TODAY().
Here are the steps you can refer to .
This is my test data:
We can create two measures like this:
First Need =
MAX('Table'[Visual Date])
Second Need = var _slicer =MAX('Table'[Type])
return
IF(_slicer = "Daily" , [First Need]-1 ,IF(_slicer="Monthly" , EOMONTH([First Need],-2)+1 ,[First Need]-7))
Then we can get the date when you change the slicer.
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly