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.
Hi,
I'm trying to find a solution where I have two slicers: year and month. I find a lot of different solutions on the forum. When I open Power BI, I want to show by default the current year and the current month. I saw already a lot of posts about this, but they are a couple of years old, I don't know whether there is a recent solution for this?
But I also want to create a third slicer where you can select how many months are shown in the visualisations. For instance I have a line graph with on the x axis the months and it shows the sales.
So in the slicer month it says current month, but in the third slicer I want to select how many months to show in the past: 5, 12, 25, ...
Thanks a lot,
Jo
Solved! Go to Solution.
@JoSwinnen , Still you have to use a workaround only m to have columns like this year and this month
Is This Year = if('Date'[Date]>=date(Year(TODAY()),1,1) && 'Date'[Date]<=TODAY(),"This year",[Date]&"")
Month Type = Switch( True(),
Date([Date]) = eomonth(Today(),-1),"Last Month" ,
Date([Date])= eomonth(Today(),0),"This Month" ,
[Month]
)
and you need save on this year and this month
Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA
Thanks! It works.
@JoSwinnen , Still you have to use a workaround only m to have columns like this year and this month
Is This Year = if('Date'[Date]>=date(Year(TODAY()),1,1) && 'Date'[Date]<=TODAY(),"This year",[Date]&"")
Month Type = Switch( True(),
Date([Date]) = eomonth(Today(),-1),"Last Month" ,
Date([Date])= eomonth(Today(),0),"This Month" ,
[Month]
)
and you need save on this year and this month
Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA
User | Count |
---|---|
16 | |
15 | |
14 | |
12 | |
11 |
User | Count |
---|---|
19 | |
15 | |
14 | |
11 | |
9 |