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.
Hi,
I have two slicers:
The first one filter the severity of a task and the second one the priority.
Both filter are a column of the table I want to filter.
When we filter a table with two slicer a && is applied on the table we want to filter. As an example, If I select severity 2 on the first slicer and priority 1 on the second, I will have all task with severity 2 && priority 1.
What I would like is all task with severity 2 || priority 1
Here is an illustration:
Name | priority | severity |
AA | 1 | 5 |
BB | 2 | 3 |
CC | 1 | 3 |
If I select severity 2 and priority 3, I would like to see the task BB and CC and not only BB
Thanks in advance
Regards
Solved! Go to Solution.
Hi @Cydevos
Calculated table is static so it can't change based on slicers.
You could create tables which has no relationship with others.
priority = VALUES('Table'[priority])
severity = VALUES('Table'[severity])
Create a measure and add it to the visual level filter
Measure =
VAR s1 =
CONCATENATEX ( priority, [priority], "," )
VAR s2 =
CONCATENATEX ( severity, severity[severity], "," )
RETURN
IF (
SEARCH ( MAX ( 'Table'[priority] ), s1, 1, 0 ) > 1
|| SEARCH ( MAX ( 'Table'[severity] ), s2, 1, 0 ) > 0,
1,
0
)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Cydevos ,
calculate([Measure], filter(all(Table),Table[priority] in allselected(Table[priority]) || Table[severity] in allselected(Table[severity]))
or
calculate([Measure], filter(all(Table),Table[priority] in values(Table[priority]) || Table[severity] in values(Table[severity]))
Hi,
Thanks for your answer.
What should I put in [measure] ?
Hi @Cydevos
[Measure]is the measure you create.
for example: Measure1=count(table[column])
the use the [Measure1] in the formula @amitchandak provided.
Could you check if any answer solve your problem?
As tested, AntrikshSharma's link is very helpful to this problem.
If it is not sloved, please share the problem with details here.
Best Regards
Maggie
Hi,
Sorry for the late asnwer. This article is really usefull. My problem is that I don't need to calculate anything,
I just want the query to return me a table with all column selected by both filter
Regards
Hi @Cydevos
Calculated table is static so it can't change based on slicers.
You could create tables which has no relationship with others.
priority = VALUES('Table'[priority])
severity = VALUES('Table'[severity])
Create a measure and add it to the visual level filter
Measure =
VAR s1 =
CONCATENATEX ( priority, [priority], "," )
VAR s2 =
CONCATENATEX ( severity, severity[severity], "," )
RETURN
IF (
SEARCH ( MAX ( 'Table'[priority] ), s1, 1, 0 ) > 1
|| SEARCH ( MAX ( 'Table'[severity] ), s2, 1, 0 ) > 0,
1,
0
)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |