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

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.

Reply
piyushjain0304
Frequent Visitor

Automatically Update Month according to Last Refresh Date

Hello all,

 

We are showing sales data to our client and they want to see the latest month data every time the data is refreshed.Is there any way I can do it in the Slicer that every time the data is updated the slicer is updated to latest month?

1 ACCEPTED SOLUTION

@piyushjain0304 ,

 

So your requirement is to achieve the default value in the slicer, right? The slicer visual doesn't support this feature, however, there's a workaround in the similar thread below:

https://community.powerbi.com/t5/Desktop/Setting-the-Default-Value-of-a-Slicer/td-p/16442

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yuta-msft
Community Support
Community Support

@piyushjain0304 ,

 

The slicer visual is based on the data column, if the data has been updated, the value in slicer will also be updated so you don't need to do anything in the slicer.

 

To achieve the latest month data, you can create a measure using dax like pattern below:

Result =
CALCULATE (
    SUM ( Table[Data] ),
    FILTER ( Table, Table = MAX ( Table[Month] ) )
)

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the reply. However this doesn't provide the solution that is required. Is there any way that slicer is updated and selected automatically to latest month based on last refresh date?

@piyushjain0304 ,

 

So your requirement is to achieve the default value in the slicer, right? The slicer visual doesn't support this feature, however, there's a workaround in the similar thread below:

https://community.powerbi.com/t5/Desktop/Setting-the-Default-Value-of-a-Slicer/td-p/16442

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Can we just update the slicer to last month and include all other months also? Client wants to see it that way?

nahid3152
Helper II
Helper II

HI,
u can use 

SlicerCheck = if(calculate(distinctcount([Month]),allselected(MASTERCalender[Month]))=1,"Y","N") for month use it on the filter on this visual part 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.