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.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
42 | |
33 | |
30 | |
18 | |
18 |