Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello everyone!
I need some help on creating a date slicer for my report. I have a script that runs every weekend and I extract some data, which I then put on a graph. Is there a way to show only the data from the latest run? I am thinking of creating a table with three columns: Run ID, Start Date and End Date, and be able to select whichever run ID I want and the slicer automatically sets the start and end date.
Do you think that that's possible? Below I show the graph and the table with the original data.
Thank you!
Solved! Go to Solution.
Hi @Anonymous and @v-xicai
Thank you both for answering! I managed to figure out a solution. On the txt files that I get the data from, I can write the start and end date so I just get those dates from there and put them on the a table. Then I created a measure to get the values between MAX(Latest start date) and MAX(Latest end date), and that was it!! I got the result I wanted!
So again thank you both for your responses!
Hi @Anonymous and @v-xicai
Thank you both for answering! I managed to figure out a solution. On the txt files that I get the data from, I can write the start and end date so I just get those dates from there and put them on the a table. Then I created a measure to get the values between MAX(Latest start date) and MAX(Latest end date), and that was it!! I got the result I wanted!
So again thank you both for your responses!
Hi @Anonymous ,
You may create a column like DAX below to get latest Date of the data table, then drag it into Page level filter or Report level filter, setting it as the latest date. Or just drag the [DateTime] into Filter pane, find and tick the latest date.
LatestDate = MAX(Sales[DateTime])
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
As far as I know, for now it's impossible to make the slicer to select the max value as default.
But I have two workarounds, they may help you, but also have limitations.
1. If you are using SQL query to load your data, you can set a flag in your query, like:
case when timestamp = (select Max(timestamp) from your_table) then yes else no end as flag.
Then you can add the flag to page filter, check "yes", after that while you update your data, it will show the latest timestamp automatically.
2. If you can't change the query or you are using other data sources, you can try to do the same thing in Power Query Editor.
For example, you can sort your data by the timestamp column by desc, then add an index column from 1.
And the same operation as above. Put the index column to page filter, select 1 as default.
I hope it can help you.
Thanks.
Aiolos Zhao
Hi @Anonymous
Thank you for your reply! In my case I have txt files.
I get what you mean and it's an interesting uproach! I shall try it out and hopefully it'll work!
Thank you!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
78 | |
53 | |
38 | |
36 |
User | Count |
---|---|
100 | |
85 | |
47 | |
45 | |
44 |