Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Slicer selected

Hi,

 

I have pass daynamic current year and month using Dax and value display correctly see below image.

Default.PNG

 

but i need selected value in slicer when i pass daynamic value see below image

 

selected.PNG

 

Thanks In Advance

 

 

Status: New
Comments
v-yuta-msft
Community Support

@Anonymous ,

 

Do you mean when you select a value in year slicer, the month slicer will not be changed? If so, you can change the visuals interaction to disable the filter from year column. For more details, you can refer to doc below:

https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Hi,

Sorry for the confusion. I have created a measure by writing a below piece of code (i.e, DefaultValue) which fetch CurrentYear and CurrentMonth data. But my concern is that the slicer dropdown of Year and Month should get selected automatically. I don't want to set the default value manually it should be automated whenever new month arrive.

 

DefaultValue =
VAR CurrentYear = Convert(YEAR(TODAY()),STRING)
VAR CurrentMonth = FORMAT(MONTH(TODAY()),"mmm")
Return
IF (
[CurrentSelection] = [TotalSelection],
CALCULATE (
Count ( BRNBR[scontract_no] ),
FILTER (RDate,RDate[Year] = CurrentYear)
,FILTER(RDate,RDate[Month] = CurrentMonth)
 
),
Count ( BRNBR[scontract_no] )
)
 
 
selected.PNG
 
Thanks In Advance.