Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I want a Custom Column with a IF Statement like this:
if [counts] = "Yes" then [date]&[mdm ID]&[User ID] else null
Can you Help me?
Solved! Go to Solution.
Hi, @rmeng
You need to use 'Text.From' function to change the date types of '[Date]', '[mdm ID]', '[User ID]' as text before the concatenation. The pbix file is attached in the end.
I created data to reproduce your scenario.
Table:
Then you may create a custom column as below.
if [Counts]="Yes" then Text.From([Date])& Text.From([mdm ID])&Text.From( [User ID]) else null
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @rmeng
You need to use 'Text.From' function to change the date types of '[Date]', '[mdm ID]', '[User ID]' as text before the concatenation. The pbix file is attached in the end.
I created data to reproduce your scenario.
Table:
Then you may create a custom column as below.
if [Counts]="Yes" then Text.From([Date])& Text.From([mdm ID])&Text.From( [User ID]) else null
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @rmeng
The code that you show looks good. Doesn't it work? What is the problem?
You'd just have to create a custome column in the query and add your code. It should work
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.