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

Two columns filtered by another one presents in another table to obtain a dynamic matrix

Dear community,

 

I request your help on a topic to know if there is solution.

 

My problem is quiet simple. I have two table:

- Criticity : a couple of code give a criticity value but there is no value if there is no criticity

Code1Code2Criticity
XX2
XY1
YZ1
YX1
ZY1

 

-User: list of user and their code

UserCode
TotoX
TotoY
TataY
TataZ
TataX

 

I have two visual on my report:

- Matrix: Row: Code1 / Column: Code2 / Value: min of Criticity

- Slicer: User

 

I would like to user the slicer to filter the matrix by username but the relashionship do not allow me to filter the columns Code1 and Code2 at the same time.

 

I tried to duplicate User table but it gender the use of 2 slicer which is not beautiful.

 

Thank you in advance for your help 😉

 

Kind regards

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can achieve that without relationship. To use a measure as below and make the matrix filtered by it can work in your scenario.

Measure = var cod = VALUES(USER[Code])
return
IF(MAX(Criticity[Code1]) in cod && MAX(Criticity[Code2]) in cod,1,BLANK())

Capture.PNG

 

For more details, please check the pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

5 REPLIES 5
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can achieve that without relationship. To use a measure as below and make the matrix filtered by it can work in your scenario.

Measure = var cod = VALUES(USER[Code])
return
IF(MAX(Criticity[Code1]) in cod && MAX(Criticity[Code2]) in cod,1,BLANK())

Capture.PNG

 

For more details, please check the pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hello @v-frfei-msft, @vanessafvg 

 

Thank you a lot for your help, the solution with the measure is fantastic and help me a lot.

 

I wish you a pleasant day 😉

 

Kind regards,

Adhes

vanessafvg
Super User
Super User

how is your relationship currently set up?

 

can you demonstrate, give an example of wha tyou trying to do?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Hello @vanessafvg ,

 

At the beginning, i made a relation between "Code" from my "User" table and "Code1" from my "Criticity" table in order to obtain the criticity matrix of a specific user.

But with this relation I only obtain a filter on matrix columns.

 

In a second time, I duplicated "User" tables and link it "Code" table with "Code2" and add a second slicer based on this new "User" field.

With this it work, I obtain the good criticity matrix but it use 2 slicers which must have the same user selected to have a pertinent result.

 

Thanks in advance for your help

If i understand correct what you need to do is create 2 relationship from the user table to the code / criticality table

 

you need to create 2 relationships, one from 

 

code = code 1

code = code 2

 

the first relationship will be the active relationship

the second one will be inactive and you will need to use userelationship  to do this from one table

 

see this video to explain

https://www.youtube.com/watch?v=sONvctPlplY&vl=en

 

you can then filter on the user once which is what you saying i think?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.