The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Sample data:
For example, I want to concatenate C1,C2,C3,C4 columns and I don't want to include Null values in the Output Column.
Thanks in advance.
Solved! Go to Solution.
I would do that kind of thing in the query editor, but here is a DAX column expression you can use. A virtual table is created with { }, filtered to remove blanks, and then the results are concatenated with no delimiter. Replace T1 with your actual table name.
Concat =
VAR ValuesAsTable =
FILTER ( { T1[C1], T1[C2], T1[C3], T1[C4] }, [Value] <> "" )
RETURN
CONCATENATEX ( ValuesAsTable, [Value], "" )
Pat
I would do that kind of thing in the query editor, but here is a DAX column expression you can use. A virtual table is created with { }, filtered to remove blanks, and then the results are concatenated with no delimiter. Replace T1 with your actual table name.
Concat =
VAR ValuesAsTable =
FILTER ( { T1[C1], T1[C2], T1[C3], T1[C4] }, [Value] <> "" )
RETURN
CONCATENATEX ( ValuesAsTable, [Value], "" )
Pat
You can add a new column with the code below:
Expected Output = Data[C1]&Data[C2]&Data[C3]&Data[C4]
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
18 | |
14 |
User | Count |
---|---|
38 | |
35 | |
21 | |
20 | |
17 |