How to set latest month as default value in slicer How to set current month as default value in slicer #powerbi #data #dataanalytics #datavisualization #slicer
Thanks, the same name is what making the slicer to keep on default, you can add a measure in the card (lookup value which I showed in the demo) as a note around the slicer if you want
Suppose my data changes earlier I was having data till 2024 Jun and now I have data till 2023 dec then how it works , currently I am facing problem on this can someone help me
Hi Pooja, the same solution given above will work, for the Max date month always it'll hold 'latest month'. In your case first time latest month would be jun 2024 now it'll be 2023 dec
Date 2 = VAR _max_date = MAX ( 'Balance date'[Balance date] ) VAR _last_three_month = EOMONTH ( _max_date, -1 ) + 1 RETURN IF ( 'Balance date'[Balance date] >= _last_three_month, "current month", FORMAT ( 'Balance date'[Balance date], "yyyy mmm" ) ) this is the dax that I have written
Hi Lakshmi, to make top 3 months as Default selection add the calculated column, Top 3 months = IF(RANKX(ALL('TableName'[YYYYMM]),'TableName'[YYYYMM],,DESC)
Super Helpful. I've looked at 10+ tutorials on this - but none of it addressed it like you did. Great Job! Appreciate it.
Thanks Prakash!
This is what I am looking for, thanks a lot !
Glad it helped you , Thanks!☺
Great, helpful!
Thanks!
Nice. Is there a way of keeping the name of the latest month instead of using "Latest Month" as the name?
Thanks, the same name is what making the slicer to keep on default, you can add a measure in the card (lookup value which I showed in the demo) as a note around the slicer if you want
Can we add this on the basis of Calendar table?
Yes, Simply check for Maximum month (date ) from calendar table and make it as latest month as shown in video
Suppose my data changes earlier I was having data till 2024 Jun and now I have data till 2023 dec then how it works , currently I am facing problem on this can someone help me
Hi Pooja, the same solution given above will work, for the Max date month always it'll hold 'latest month'. In your case first time latest month would be jun 2024 now it'll be 2023 dec
I have a date table and a fact and they are connected to each in your case you are having only one table
Can you tell me what logic do I need to use
Date 2 =
VAR _max_date =
MAX ( 'Balance date'[Balance date] )
VAR _last_three_month =
EOMONTH ( _max_date, -1 ) + 1
RETURN
IF (
'Balance date'[Balance date] >= _last_three_month,
"current month",
FORMAT ( 'Balance date'[Balance date], "yyyy mmm" )
) this is the dax that I have written
It is giving me correct results in the calculated column but not in the slicer
I want to keep the default selection for the last 3 months, how can I achieve this ,can you help me 🙏
Hi Lakshmi, to make top 3 months as Default selection add the calculated column,
Top 3 months = IF(RANKX(ALL('TableName'[YYYYMM]),'TableName'[YYYYMM],,DESC)
@@thebihub Thanks for this one! It worked perfectly here.
@@izabelapereira1679 thanks!
Thanks but i. My reult mam seeing latest month and dec as well
Can u pls help
Can u pls help