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.
I have a categories
Categories
A
B
C
D
E
Desired category output is
A,B = Car
A,B,E=Bike
A,B,C,D,E=Plane
Solved! Go to Solution.
@GAURAV7781 I have a coarse solution if I understand your issue correctly.
Measure =
VAR __selected =
CONCATENATEX ( ALLSELECTED ( Categories[Category] ), Categories[Category] )
RETURN
SWITCH (
__selected,
"AB", "Car",
"ABE", "Bike",
"ABCDE", "Plane",
"Other option"
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi ,
This is the least to say a creative solution to the problem! 🙂
I'm pretty sure if you try "SW" instead of "WS" it will work.
If it doesnt, i'll help you with a different approach.
Regards,
Robbe
@GAURAV7781 I have a coarse solution if I understand your issue correctly.
Measure =
VAR __selected =
CONCATENATEX ( ALLSELECTED ( Categories[Category] ), Categories[Category] )
RETURN
SWITCH (
__selected,
"AB", "Car",
"ABE", "Bike",
"ABCDE", "Plane",
"Other option"
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@CNENFRNL hi is there a way to make desired column as slicer . My user want to select car and bike as filter
Hi ,
This is the least to say a creative solution to the problem! 🙂
I'm pretty sure if you try "SW" instead of "WS" it will work.
If it doesnt, i'll help you with a different approach.
Regards,
Robbe
@GAURAV7781 I see many other viz on this page, thus the result of your Area viz is an integrated effects under all possible filtering on viz. Pls try this if you'd like to make Area viz independant of other filterings,
Measure =
VAR __selected =
CONCATENATEX (
CALCULATETABLE ( ALLSELECTED ( Categories[Category] ), ALLEXCEPT ( Categories, Categories[Category] ) ),
Categories[Category]
)
RETURN
SWITCH (
__selected,
"AB", "Car",
"ABE", "Bike",
"ABCDE", "Plane",
"Other option"
)
Better to attach a mockup file for further debugging if the issue lingers.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
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 |
---|---|
41 | |
19 | |
19 | |
16 | |
15 |
User | Count |
---|---|
49 | |
26 | |
22 | |
17 | |
16 |