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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
GCL
Frequent Visitor

Filter data in a matrix with column dependencies

Dear,
Hello,

 

I'm trying to find a solution for the following scenario.

 

A slicer contains four (char) values: A B C D. Each value represents a step in a process flow.
Principles to be applied:
- case (A) I would like to see the values A B as columns in a matrix in case of selecting the slicer value B
- case (B) I would like to see the values A B C as columns in a matrix in case of selecting the slicer value C
- case (C) I would like to see the values A B C D as columns in a matrix in case of selecting the slicer value D

 

On top of this, I'm only interested in these matrix rows where
case (A) process step A -> A-flag = 1
case (B) process step A and B -> A-flag = 1 and B-flag = 1
case (C) process step A and B and C -> A-flag = 1 and B-flag = 1 and C-flag = 1


Thank you for considering my scenario!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @GCL 

 

Please new a measure:

Measure = 
VAR _slicer = SELECTEDVALUE('Table2'[Step])
VAR _step = MAX('Table'[Step])
VAR _filter = 
SWITCH(
    TRUE(),
    _slicer="A"&&_step="A"&&[Flag-A]=1),1,
    _slicer="B"&&(_step="A"||_step="B")&&([Flag-A]=1&&[Flag-B]=1),1,
    _slicer="C"&&(_step="A"||_step="B"||_step="C")&&([Flag-A]=1&&[Flag-B]=1&&[Flag-C]=1),1,
    _slicer="D",1
)
RETURN
_filter

then use as matrix's filter.

vcgaomsft_0-1664964318767.png

If this doesn't work or I misunderstood your requirements, please consider releasing the file with the sensitive data removed and the expected output.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @GCL 

 

Please new a measure:

Measure = 
VAR _slicer = SELECTEDVALUE('Table2'[Step])
VAR _step = MAX('Table'[Step])
VAR _filter = 
SWITCH(
    TRUE(),
    _slicer="A"&&_step="A"&&[Flag-A]=1),1,
    _slicer="B"&&(_step="A"||_step="B")&&([Flag-A]=1&&[Flag-B]=1),1,
    _slicer="C"&&(_step="A"||_step="B"||_step="C")&&([Flag-A]=1&&[Flag-B]=1&&[Flag-C]=1),1,
    _slicer="D",1
)
RETURN
_filter

then use as matrix's filter.

vcgaomsft_0-1664964318767.png

If this doesn't work or I misunderstood your requirements, please consider releasing the file with the sensitive data removed and the expected output.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.