Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

See the actual year by default on my FYear SLicer

HI,

Im developing a dashboard in which I would like to see , In  the slicer I have to select the year the actual year by default.(in this case 2020). and at the sime time the option to change the year in the slicer , just in case that I want to do it. So in few words i would like to see the current year in the fiscal year slicer by default and that by the time it changes automatically depending on the year we are.fyear.PNG

I have these metrics and actually have a metric that identifies me the current year as you can see in the next image:

fy2.PNG

But I can not manage to make the current year appers on my slicer by default.

Thanks a lot!

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can try to select the current year and then publish or save the report so that when you open the report, the default value in the slicer is the year you selected earlier.

You can also follow the steps below:

1. Create an unrelated FYear table as slicer

2. Create a measure as the visual level filter.

Measure 2 =
IF (
    MAX ( 'Table'[iscurrent] ) = 1
        && NOT ( ISFILTERED ( 'Table 2'[fiscalyear] ) ),
    1,
    IF (
        ISFILTERED ( 'Table 2'[fiscalyear] )
            && MAX ( 'Table'[fiscalyear] ) IN VALUES ( 'Table 2'[fiscalyear] ),
        1
    )
)

test_See the actual year by default on my FYear SLicer.PNG

Sample .pbix

 

Please focus on this idea

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19055692-slicer-default-selected-values 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can try to select the current year and then publish or save the report so that when you open the report, the default value in the slicer is the year you selected earlier.

You can also follow the steps below:

1. Create an unrelated FYear table as slicer

2. Create a measure as the visual level filter.

Measure 2 =
IF (
    MAX ( 'Table'[iscurrent] ) = 1
        && NOT ( ISFILTERED ( 'Table 2'[fiscalyear] ) ),
    1,
    IF (
        ISFILTERED ( 'Table 2'[fiscalyear] )
            && MAX ( 'Table'[fiscalyear] ) IN VALUES ( 'Table 2'[fiscalyear] ),
        1
    )
)

test_See the actual year by default on my FYear SLicer.PNG

Sample .pbix

 

Please focus on this idea

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19055692-slicer-default-selected-values 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , I think there is no way to have a default value in the slicer. But The only way you can have you use that 1 and 0 filters to restrict the values.

Or Have desc Rank on FY and always select rank 1 at the page level.  But that will not show any other value in the slicer.

Like call 1 or Rank1 as Current Year

 

If([flag]=1, "Current FY", [FY]) // Or use the rank

In this manner, you can always select Current FY

parry2k
Super User
Super User

@Anonymous, unfortunately, there is not an easy way to make default selection especially when you want user to select other years as well, there are workarounds but not a straight forward solution for this. Maybe there is a custom slicer visual that allows to set the default value (I never used one)

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.