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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
brunakopik
Helper I
Helper I

Slicers and Relationships

Hello,

 

I am trying to get the filters to update one of the charts I have in my dashboard:

 Updating Media

 

This is what I would like to do (not working right now):

When I click on Select All, it shows all 5 colours

When I click on 2023/24, show 2020, 2022, target 2024/25

When I click on 2024/25, show 2020, 2022, target 2024/25, 2024

When I click on 2025/26, show 2020, 2022, target 2024/25, target 2025/26

 

Here is the data:

Fiscal Year data (slicer):

brunakopik_1-1739474979112.png

 

Chart data:

brunakopik_2-1739474989620.png

 

 

What type of column should I add to both datasets so that I can build a relationship? I can't simply do fiscal years because I have SelectAll in the slicer.

 

Thanks!

Bruna

6 REPLIES 6
brunakopik
Helper I
Helper I

@Anonymous  any luck solving this issue? Thanks!

Anonymous
Not applicable

Hi  @brunakopik ,

Is your sample data in the following image style with a [Select All] column next to it to create a hierarchical effect::

vyangliumsft_0-1739780156835.png

You can change measure to the following:

Flag =
var _select = SELECTCOLUMNS('Fiscal Year data',"select",[Fiscal Year])
var _count=COUNTX(ALLSELECTED('Fiscal Year data'),[Fiscal Year])
return
IF(
    HASONEVALUE('Fiscal Year data'[Select ALL])=TRUE()&&_count=3,1,
SWITCH(
    TRUE(),
_count=1&&CONTAINSSTRING("2023/24",_select)=TRUE()&& MAX('Table'[Year]) in {"2020","2022","Target 2024/25"} ,1,
_count=1&&CONTAINSSTRING(_select, "2024/25")=TRUE() && MAX('Table'[Year]) in {"2020","2022","Target 2024/25","2024"},1,
_count=1&&CONTAINSSTRING(_select, "2025/26")=TRUE() && MAX('Table'[Year]) in {"2020","2022","Target 2024/25","Target 2025/26"},1,0
))

vyangliumsft_1-1739780156839.png

 

 

Best Regards,

Liu Yang

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

Thanks, but it is not working:

 

It onlt shows 2020 data for 2023/24 and SelectAll:

 

brunakopik_0-1739899548908.png

 

For 2024/25:

 

brunakopik_1-1739899562509.png

 

2025/26:

 

brunakopik_2-1739899586188.png

Here are is the DAX:

 

brunakopik_3-1739899611792.png

 

brunakopik_4-1739899622305.pngbrunakopik_5-1739899630907.png

 

 

And filters:

brunakopik_6-1739899647624.png

 

Anonymous
Not applicable

Hi  @brunakopik ,

 

Here are the steps you can follow:

1. Create measure.

Flag =
var _select=SELECTEDVALUE('Fiscal Year data'[Fiscal Year])
RETURN
IF(
    HASONEFILTER('Fiscal Year data'[Fiscal Year])=FALSE(),1,
SWITCH(
    TRUE(),
_select = "2023/24" && MAX('Table'[Year]) in {"2020","2022","Target 2024/25"},1,
_select = "2024/25" && MAX('Table'[Year]) in {"2020","2022","Target 2024/25","2024"},1,
_select = "2025/26" && MAX('Table'[Year]) in {"2020","2022","Target 2024/25","Target 2025/26"},1,0)  )

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_0-1739498829333.png

3. Result:

Slicer – Select all:

vyangliumsft_1-1739498864448.png

Slicer – 2023/24:

vyangliumsft_2-1739498864454.png

 

Best Regards,

Liu Yang

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

 

 

Hi,

 

Thank you!

 

It didn't work - I wonder if it's because the slicer is single select? Here is what the data looks like:

brunakopik_0-1739570999527.png

And in the report:

brunakopik_1-1739571023595.png

Slicer:

brunakopik_2-1739571045200.png

 

 

What can I do instead?

Thanks,

Bruna

brunakopik
Helper I
Helper I

This is the chart that I referenced:

 

brunakopik_0-1739475139820.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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