Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |