Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello all
I have a report with several filters. One of the filters is for a specific date. For example the data-source contains the dates 5.10.2018, 6.10.2018, 7.10.2018, 8.10.2018
The user has to select the latest date, in this case 8.10.2018. Its always yesterday.
I created a measure to get this date.
But i cant find out how i can set this value as a default value for the filter. I tried the «Smart Filter by OKViz» and the original filter by Power BI.
Is this possible, or do anyone has another idea that would get me the expected result?
Solved! Go to Solution.
The date slicer shows the value unselected, but selecting it after selecting the flag slicer doesn't add any filter to your report (it is already filtered!)
I understand it would look neater if the date was selected, but it is not something you can achieve I am afraid.
What though if we're using a live connection and can't create additional columns?
Hi @Anonymous,
Based on my research, the measure could not be used in the slicer, you could refer to Arentir's solution to solve your problem.
Regards,
Daniel He
Hi @Anonymous
It won't work as a measure, you should have a new column in your date table to identify latest date ("Y" / "N" for instance). Then you can use that as a filte.
A good article on the subject:
https://www.fourmoo.com/2018/09/11/power-bi-default-slicer-selection/
Correct me if im wrong, but as far as i understand this, it will always be the specified value. In my case, this should just work as a default value, it has to be still possible to select another date.
Forgot to say this in my post.
EDIT:
I read your post again and i misunderstood it, but its still impossible this way. I cant change the data-source.
I made a column over power bi with the "yesterday" value.
I don't think there is a way to just default, hence why I would use a "Latest Date" Flag, for instance in a slicer. You can click/unclick this slicer to see all dates.
You don't need to change the datasource, you can create a calculated column
Hello @Arentir
Thank you for your answer. So far, i didnt manage to get it to work.
I dont know if i understand you correctly:
I have a slicer(?) with all dates available in the column. I already ordered it desc so the latest date is the first one.
I tried to use a calculated column with the [Yesterdays Date] value but dont know how to apply it properly.
I also tried to figure out what you mean with a latest day flag column, as a own column it basically would only have one row or not? (9.10.2018)
I hope you see what i mean.
Thank you and kind regards
Hi @Anonymous,
See the PBI example attached, I have a calendar table and added two columns: one for latest date in the table and one for yesterday
See how the Flag slicer change your date slicer. Let me know if it works for you
https://1drv.ms/u/s!As5oZCclkGkWgSqo1vvqL-qtMxif
Hello @Arentir
Thanks for your file.
I had a look at it and understood it.
I built it into my existing report.
When i check the "use yesterday" filter it removes all other dates, but the user still has to select it in the dropdown.
I have to use the dropdown as there can be many entries if the user selects "no"
Is it possible that the dropdown selects the entry if only 1 is available? Or is this the limit?
The date slicer shows the value unselected, but selecting it after selecting the flag slicer doesn't add any filter to your report (it is already filtered!)
I understand it would look neater if the date was selected, but it is not something you can achieve I am afraid.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |