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
Anonymous
Not applicable

Slicer Default Setting and configurations

Hello Experts,

Please can you share the DAX commands or other ways where I can set my filters to default value. 

Requirement: Default last 3 year financial years have to be displayed from current date. I have a slicer with Hierarchy and able to display Year, Quarter and month 

2. I have to set default to all the filters I have .. 

3. I have attached a picture, when I sort the Financial Year are sorting not just the quarters in this. Any helpSort_Calendar.PNG

2 REPLIES 2
Anonymous
Not applicable

I created the first filter and I am not able to select as well. Probably I need help. My dates are hierarchical with Financial years.  2. I also need to configure 3 default divisions in division slicer .. almost all my slicers come with default settings 😞 any help is appreciated.

amitchandak
Super User
Super User

@Anonymous , If no date is selected

//Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date),Date[Date]) //
var _min = eomonth(_max, -36) +1
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

 

 

//Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date),Date[Date]) //

var _maxy = maxx(allselected(Date),Date[year])
var _min = minx(filter(all('Date'), Date[year] = _maxy -3),Date[Date])
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

 

 

 

If date is selected, then you need independent table

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = eomonth(_max, -36) +1
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

 

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.

Top Solution Authors