Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello,
I have a slicer on my visuals selecting the previous month, therefore excluding the current month.
Now, the problem occurs when the new year begins. As you can guess the slicer will select Demcember as the last month and the visual will stay on 2022.
What I've done is that I created a slicer that will always select the current year. Will this solve this problem, or is there anyhting else I need to do?
The code:
Latest Month =
if(
month(today()) -1 = month(Date_Table[Date]) ,
"Vorige maand",
Date_Table[Month Name]
And
Current Year =
IF(
'Date_Table'[This Year] = 'Date_Table'[Year],
"Huidig jaar",
FORMAT('Date_Table'[Year], "General Number")
)
@Solans , Based on what I got. It would better to have month year slicer like
Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1*month(Today())),"Last year Last Month" ,
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
eomonth([Date],0)= eomonth(Today(),-1*month(Today()) ),"Last Dec" ,
Format([Date],"MMM-YYYY")
)
Hi,
Thanks for your reply, however this doesnt seem to work as intended.
For reference, I am trying to use the slicer on two visuals that show the count of tickets.
The first visual has to show the count of tickets for 2 different departments and for every month of this year.
The second visual shows the count of total tickets of the current year (of completed months) in comparison with last year.
Now the problem I have is that when it is Januari, the month selected is then December, The visuals then show the data of 2022, and I have to manually update the year to the next.
Picture for reference:
User | Count |
---|---|
66 | |
60 | |
47 | |
33 | |
32 |
User | Count |
---|---|
86 | |
75 | |
56 | |
50 | |
45 |