Forum Discussion
Need some guidance on reports
Hi,
I have some already constructed reports. One of the filters is the Year.
How can I set a default year (current) when opening the report?
Thank you
- Anonymous3 years ago
Hi CostasD ,
Here are the steps you can follow:
1. Then we find the "Preselected Slicer" and add the visual to our Power Bi Desktop.
2. First , we need to create a table with one column , and the value is True and False,.
3. Second , we can create a measure to define which the year we need to default preselected. If we need to default preselect then we return True else return False.
Flag = var _date =SELECTEDVALUE('Table'[Year]) return IF(_date = YEAR(TODAY()) , TRUE(),FALSE())4. Then we can put the 'Table'[Date] in the Fields , [Flag] in the Pre Selection , 'Dirty Table'[Dirty Status] in the Dirty Status, like below screenshot:
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
2 Replies
- ray_aramburo
Super User
Go to Power BI Desktop, change that slicer value to the one you desire to be the default and publish it with that current state.
Just for your awareness, even though you have a default selection, if the users are using your report, the report will open with the status it had when they closed it.
There's a "Reset report to default" button on top if you want them to return to the default or you can create a bookmark for that purpose.
- AnonymousNot applicable
Hi CostasD ,
Here are the steps you can follow:
1. Then we find the "Preselected Slicer" and add the visual to our Power Bi Desktop.
2. First , we need to create a table with one column , and the value is True and False,.
3. Second , we can create a measure to define which the year we need to default preselected. If we need to default preselect then we return True else return False.
Flag = var _date =SELECTEDVALUE('Table'[Year]) return IF(_date = YEAR(TODAY()) , TRUE(),FALSE())4. Then we can put the 'Table'[Date] in the Fields , [Flag] in the Pre Selection , 'Dirty Table'[Dirty Status] in the Dirty Status, like below screenshot:
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly