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.
Does power BI has some sort of match function where I pass a column, a list of values from that column, and put those values as a certain category?
For instance, the values from a col called Produtcts are: Honda, BMW, Ferrari, etc I want to group into a column called category as Car, the others values, as others.
In another BI tool i use a function like this Category = If(match("Produtcs", ("Honda","BMW","Ferrari"))>0, Car,Others))
Does Dax has sometning like that?
Thank you!
Hi,
You could use the IN operator to do that kind of "match".
In your example the new column could be created with the following DAX statement:
Category =
IF (
'Table'[Products] IN { "Honda", "BMW", "Ferrari"},
"Car",
"Others"
)
Br,
Magnus
is there function equivalent to "IN with wildcard"? for example match x IN { "foo*, fo-o*", "bar"}
Old question, but never answered. I have 1.8 million rows and 1400 distinct values. It simply isn't practical to list them on the command line, not to mention, it's an easy match -- the first two or three characters will get me where I need to be. Awk is looking more promising.
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |