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 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
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 |
---|---|
102 | |
48 | |
19 | |
13 | |
11 |