The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I have a hierarchical date slicer with year, month and a calculated column which will give the current day as a string if the date is equal to today.
This is the code for me calculated column '_Huidige_dag' or current day.
_Huidige_dag =
IF (
Datums[Date] <> TODAY (),
CONVERT ( Datums[DagVanMaandNummer], STRING ),
"huidige dag"
)
The result is working well and changes the date in the same month but when it comes to the end of the month it does not change like in the example above. The current day is after the 30th of November but it should be in the month December the 7th.
Thanks!
Kind regards
Solved! Go to Solution.
Consider using the Filter Pane instead. It offers relative date filters.
Here is the general pattern:
- create a string representation of your date column, replace the latest date with a string "Latest"
- sort that new column by the original date column
- add a slicer or visual/page/report level filter
- set the filter to "Latest"
- publish the pbix to the workspace/app
Hello,
I understand what you're trying to say and this will indeed work but when I do that I don't have a hierachical slicer. What I did works partially, it's just that when it comes to a new month that it does not jump to a new month like shown in my first image. When it was the 1th of December, "Latest Date" was shown after the 30th in the month November.
It is the intention for the user to see data for the latest date automatically or a date that they can choose from using the hierarchical date slicer which is easier to pick a date. If I use your example, they need to scroll down to search a specific date (but a solution could be to use the search tool now that it is a string format).
I just want to know if it is possible with my example and if I did something wrong causing the bug that I have right now.
Kind regards
Consider using the Filter Pane instead. It offers relative date filters.