Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I need your help please.
i have a column i created with the dax, the values for example A, AB, ABC, BC, C, B, AC, i need to create a filter that shows me A, B, C
A : when the values are A, AB, ABC, AC
B : when the values are AB, ABC, BC, B
C : when the values are ABC, BC, C, AC
I created a DAX query
Team = IF (NameColumn IN {"A", "AB", "ABC", "AC"}, "A"
, IF (NameColumn IN {"AB", "ABC", "BC", "B"}, "B"
, if (NameColumn IN {"ABC", "BC", "C", "AC"}, "C", "Other")))
This DAX query did not work, it shows me these results :
For exemple :
when I click on A in the filter it shows me the sum of AB, A, ABC : 2+3+5
when I click on B in the filter it shows me the sum of : BC,B : 4+2
when I click on B in the filter it shows me the sum of : BC,B : 4+2
it does not show me the value C in the filter.
but what I'm looking for is to make a filter with the values A, B and C
Exemple:
when I click on A in the filter it shows me the sum of AB, A, ABC : 2+3+5
where i click on B in the filter it shows me the sum of AB,ABC,BC,B : 2+5+4+2
where i click on C in the filter it shows me the sum of ABC,BC : 5+4
Solved! Go to Solution.
Hi @TRPBI ,
According to your description, here’s my solution.
1.Create a table, there’s no relationship between the two tables.
2.Create a measure.
Result =
SWITCH (
SELECTEDVALUE ( 'Table (2)'[Type] ),
"A",
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( 'Table', [Tag] IN { "AB", "A", "ABC" } )
),
"B",
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( 'Table', [Tag] IN { "AB", "ABC", "BC", "B" } )
),
"C",
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( 'Table', [Tag] IN { "ABC", "BC" } )
)
)
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I see that measure [Result] can be more dynamic as well.
So try the measure below:
That works thanks
Hi @TRPBI ,
According to your description, here’s my solution.
1.Create a table, there’s no relationship between the two tables.
2.Create a measure.
Result =
SWITCH (
SELECTEDVALUE ( 'Table (2)'[Type] ),
"A",
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( 'Table', [Tag] IN { "AB", "A", "ABC" } )
),
"B",
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( 'Table', [Tag] IN { "AB", "ABC", "BC", "B" } )
),
"C",
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( 'Table', [Tag] IN { "ABC", "BC" } )
)
)
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@TRPBI Well of course not, all of your C's are in your A's and B's. So you have a disconnected table for A, B and C selection or ? I'm not exactly clear on this one.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
8 |