Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
How do I write out a measure that would concatenate two columns based on the following conditions:
If Employee ID is blank then result should always be blank
If Employee ID is filled in but City OR State Contains Not Applicable OR Not Disclosed then also blank
If all columns are filled in, concatenate Case # & Employee ID
Solved! Go to Solution.
Hey @StoryofData !
Try the DAX bellow, and if it helps, please mark as solved. Thanks!
new_column =
SWITCH (
TRUE (),
[Employee_ID] = BLANK (), BLANK (),
[Employee_ID] <> BLANK ()
&& CONTAINS ( YOUR_TABLE, [CITY], "NOT APPLICABLE", [STATE], "NOT APPLICABLE" )
= TRUE ()
|| CONTAINS ( YOUR_TABLE, [CITY], "NOT DISCLOSED", [STATE], "NOT DISCLOSE" )
= TRUE (), BLANK (),
COMBINEVALUES ( "-", [CASE], [EMPLOYEE ID] )
)
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
Thank you so so much! I went down few different avenues but did not try swith
Hey @StoryofData !
Try the DAX bellow, and if it helps, please mark as solved. Thanks!
new_column =
SWITCH (
TRUE (),
[Employee_ID] = BLANK (), BLANK (),
[Employee_ID] <> BLANK ()
&& CONTAINS ( YOUR_TABLE, [CITY], "NOT APPLICABLE", [STATE], "NOT APPLICABLE" )
= TRUE ()
|| CONTAINS ( YOUR_TABLE, [CITY], "NOT DISCLOSED", [STATE], "NOT DISCLOSE" )
= TRUE (), BLANK (),
COMBINEVALUES ( "-", [CASE], [EMPLOYEE ID] )
)
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 54 | |
| 47 | |
| 38 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 81 | |
| 71 | |
| 38 | |
| 28 | |
| 25 |