Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello Community,
I haven't yet been able to finding anything like this on forums.
I am trying to do 2 things:
1) Set the Default selection of a slicer to the result of a measure.
2) Somehow create a clickable button (i.e. bookmark) to return the user back to the default selection* (but not exactly).
Goal 1) Set the Default selection of a slicer to the result of a measure.
I have created the measure "Current Fiscal Year" as follows:
Currently, the month is May. Therefore, "Current Fiscal Year" = "Current Year" (2023), for the time being.
However, as of July 1st, "Current Fiscal Year" will change from 2023 to 2024.
What I want is for Power BI to read the calculated value of "Current Fiscal Year" and set the default Year slicer to that value.
For example:
- Today, the default value of the Year slicer should be set to "2023" ([Current Fiscal Year])
- As of July 1st, the default value of the Year slicer should automatically change to "2024" ([Current Fiscal Year])
The Year slicer needs to allow multi-selection, but for the default value, it should always resolve to the result of [Current Fiscal Year].
Goal 2) Create a clickable button (i.e. bookmark) to return the user back to the default selection* (but not exactly).
*The key thing here is that it's not truly the default selection.
It must again set the Year slicer equal to the value of [Current Fiscal Year].
If I were to create a bookmark today (when Current Fiscal Year = 2023), it would work until 7/1, at which time, I believe it would break because the bookmark would retrieve the old stored value of 2023, and not the correct newly calculated value of 2024 from [Current Fiscal Year].
NOTE: It's true that twice a year I could go in and create bookmarks manually.
But this seems a lame way to handle it, considering the measure is calculating the Fiscal Year correctly in real-time.
It makes much more sense to use a measure to automate it; if possible.
Is there a way to do both of these things, or even one of them?
Thanks,
Nathan
There aren't advanced controls around default slicer selections and, as far as I know, making a slicer responsive to a measure output is not possible (outside of filtering slicer options based on a measure, which isn't what you want from what I understand). The most we have for default slicer selection is that the selection we have saved when we publish the report is the default selection the user gets when they open it up. However, you can use this to achieve what I think is your objective.
Add a column that identifies the current fiscal year, have that identifier be the default (selected on save) value in your slicer, and then just update the data as needed such that the identifier moves to the next year when aplicable.
E.g. with simplified date table:
Today your data and slicer would look like:
And on July 1 your data and slicer would look like:
I just used enter data functionality to make the change to the table, but note that I didn't touch the slicer at all, it (somehwat mindlessly) keeps the "Current" value selected. This, I think, is the closest you can get to a slicer dynamically designating a default selection.
Note: be sure to sort the slicer column by the source column or your equivalent of "Current" may appear out of order in the slicer.
Thanks for teaching me that this functionality doesn't exist in Power BI. Glad to learn that.
I can see that your suggestion of adding a Year_Slicer column in the data would save me from having to publish changes each time the Current Fiscal Year needs to be updated. However, business wants the actual Year number to appear in the slicer (even for the current year). Of course, the word "current" is not a number. So this is not desired.
Additionally, it is unfortunate that I already have a measure that is automatically calculating the [Current Fiscal Year], and yet I would still have to manually update the Current Fiscal Year every time it changes anyway. This seems a waste of having the automated measure.
Regardless, I hear you that this functionality doesn't exist.
Thanks for taking the time to explain.
Regards,
Nathan
An alternative could be to do this with buttons and bookmarks.
You can have three buttons where 1st is always Current Yr-1, 2nd is CurrentYr, and 3rd is CurrentYr+1. You can tie button text to a measure, so button text can automatically update based on current fiscal year.
Then create a measure for each button year option to use as a filter on all applicable visuals on the page. These should also update dynamically based on current fiscal year.
Finally, for each button, set the filter with corresponding measure applied, capture the bookmark, associate bookmark to button.
Probably would make sense to add an 'All' with cleared filters bookmark, too.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |