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.
is it possible in power bi like whenever user opens report by default data for current year should be selected ?
for example: I have created report which consist year slicer 2019,2020, 2021 and 2022 . if I save the report by selecting year 2022 i.e current year and publish over on services it shows default 2022 i.e current yeat but here new year get added like 2023 report should take 2023 as a current year and report should get updated for 2023( I don't want to save report by selecting each year and publish it should be automatic)
Solved! Go to Solution.
Hi Another but similiar way could be to add a calculated column to your table. The main diffrerence is you place this calc col in fliter pane and no worry about selecting once it there.
Current Year in Date Table CC =
Curr Year =
var cyear = YEAR(TODAY())
return
IF(Dates[YEAR] =cyear,
"Current", CONVERT(Dates[Year],STRING))
*Use this (calc column) for your slicer and select current year from filter pane and it will always open to current year.
Hi Another but similiar way could be to add a calculated column to your table. The main diffrerence is you place this calc col in fliter pane and no worry about selecting once it there.
Current Year in Date Table CC =
Curr Year =
var cyear = YEAR(TODAY())
return
IF(Dates[YEAR] =cyear,
"Current", CONVERT(Dates[Year],STRING))
*Use this (calc column) for your slicer and select current year from filter pane and it will always open to current year.
Hi @komald ,
You can do a little workaround here,
Create a seperate column for slicer:
SlicerYear= IF(YEAR(Table[DateColumn])= YEAR(MAX(Table[DateColumn])), "Current Year", Table[DateColumn])
Now, put this field in your slicer and keep Current Year selected when you save the file. This way, always the current year would be shown.
Mark this as a solution, if I answered your question. Kudos are always appreciated.
Thanks
But every time i need to select current year and save the file, i don't want to do like this , my slicer should be automatically get selected whenever new year get added as current year so that not need to select current year and save the file
User | Count |
---|---|
25 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |