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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Invisibleman
Helper II
Helper II

how to set select all in the checkbox slicer thru the formula

Dear all,

 

For the power BI I am working on, I have an issue with the year selection and the charts I have. For so far, the charts are following the selected years, but when I start to de-select from the highest to the lowest year and all years are being de-selected, the chart is showing blank. But I want then that all the years become selected again by formula or at lesst the selected year will become the highest possible year, so the chart will not show up in blank. But I what ever I try, nothing sofar is helping.

See the picture in what I mean and also how I am trying to solve this problem.

The formula I am using is;

Highest Selected Year =
var InputYear = max('mapCalendar'[Year])
var InputYearString = format(InputYear,"####")
VAR test = iferror(convert(InputYearString,INTEGER),"")
VAR AnySelected = ISFILTERED(mapCalendar[Year])
VAR CountSelected = Countrows (values (mapCalendar[Year]))
Return if(or(anyselected=false,isblank(CountSelected)),format([Actual Current Year],"####"),InputYearString)

 

YearSelection.jpg

 

If anybody can help in this.

 

Thanks,

Hans

2 REPLIES 2
lbendlin
Super User
Super User

don't enable the "Select all" option

Hello Ibendlin,

 

I guess that will solve the problem, but it is not the solution I was looking for. As I do want to have the Select All inside as it will make it easier for others to work with the report. Then for now I will need to inform them, about the situation when it wil ocur.

 

But if there's anybody has any other solution, then please let me know. 

 

Regards,

Hans

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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