Power BI - How to Set a Default Slicer Value

preview_player
Показать описание
Thanks for helping me get to 1000 subscribers! Let's celebrate with a fun trick that allows you to set default slicer selections! This is a fun trick that seems to be asked about a lot. In this video, I will show you how to default your data to show the current month's data.

Enroll in my introductory or advanced Power BI courses:

Elite Power BI Consulting:

Data Insights Tools:
Рекомендации по теме
Комментарии
Автор

A solid technique for sure. However, what a lot of people are looking for is a way to change the actual slicer selection upon refresh. For example, imagine a model is updated weekly, and there is a slicer set to filter on the latest week (i.e. "week ending mm/dd/yyyy"). When the report is updated, the slicer for week does not "change itself" to the newest week; users are still required to make that change. Thanks for all your contributions to the community!

exilestreethawk
Автор

What a Great Video..Amazing DAX logics. Thanks a lot!!

pratikfutane
Автор

This measure here is a pure gold, thanks a lot! Can be used for any period, week, year with a little tweak
For my task - get variable filter for each month of 3 years i only need to + YEAR - YEAR * 12

Var. filter =
IF(
MONTH('Date'[Date]) = MONTH(TODAY()) && YEAR('Date'[Date]) = YEAR(TODAY()),
0,
MONTH(TODAY()) - MONTH('Date'[Date]) + ((YEAR(TODAY()) - YEAR('Date'[Date])) * 12)
)

Balgalw
Автор

I couldn't get the second IF statement to work with dates (results just showed blank), but it worked once I replaced it with a Filter expression. Either way, I've been looking for this solution for a while now. Thanks so much for sharing!

dannyngo
Автор

Great! I had a similar problem, and thanks to you my problem is solved. Thanks a lot! ;)

helderbnunes
Автор

Thats a lot of hoops to jump through for such a simple function. Thanks for the tut

squantrill
Автор

This works great IF you've got only a few different visuals... But Is there a way to set a default slicer for the entire report? (not just specific visuals) - I've got dashboards with literally 40-50 visuals spanning a few pages.

PabloSansEgo
Автор

Inspiring video, thanks .. I found it when i was looking for a solution for my case, which I have an event calendar table and want to show one event (let's say event A) with each other single events, so it is more like event A should always be in the calendar with the other event(s) which is (are) selected by the user. I appreciate any suggestion/help. Thanks :)

jbyxxx
Автор

do you ahve a video how to make that exact slicer ? Thx

tuanhanhpham
Автор

what if the column we want defaultselection for is not a date column rather what if it's a text column.
If column has value like '2020-21'. Is it possible to do it for text column??

pranavratnalikar
Автор

How did you create the month's tabs?

minstreltokunbo
Автор

How do i do it for the days in a month? How do i write the dax for it? Sorry. Pretty new to this.

PolarBunny
Автор

Hello great video. I tried working on this but the date range is giving me wrong "Month(s) ago" values since there are data from last year. How do I deal with this?

BigBear
Автор

This does not "set a default slicer value"; this only filters data based on slicer (or simulate click on "Current Month" when nothing is selected), but slicer is not setup automatically based on some data. I'm looking for solution: when new day is processed in DWH, I need slicer to be automatically switched for that new date.

CyNETTx
Автор

how to count how many itmes selected in slicer in power Bi ?

Laxmanmane
Автор

Thanks for the video. But I am confused: if we selected all or none, the logic goes to the second IF, how can the expression = "Current Month" be true, it should return Blank(). Anyone could help?

shaoboji
Автор

I have data from Jan/01/2021 to up to current date and also future dates in my date table. I want to show the current month as the default Month in slicer dynamically ( whenever we are getting the latest data)

venkatareddykummitha
Автор

This is indeed cool; however, what most of us wish is to **visually** have the slicer change to a default value. With this trick, it can be confusing for the user since they don't know the actual value filtered in the visualizations.

karloisaac
Автор

I get the result as Blank, am I missing something, please help

sunilkamat
Автор

Hello, is there a similar workaround to default a slicer based on user log in? The RLS settings work fine, but when the dashboard is accessed the slicers are not automatically selected. What I was hoping to do is:

If user 1 logs in, this user should automatically see his or her own data and the slicer is automatically selected. But based on user 1’s role, he/she should still be able to see other options in the slicers.

What I am having issue now is when user 1 logs in, this user can see the options relevant to him/her but the slicer is not automatically selected by default so the visuals still show blank.

Appreciate your advice. Thanks in advance!

marianmolina