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.
Hello,
I've created a column in my data that has a nested concatenation to determine when a cell within three particular columns has a blank value. The concatenation is working and allows me to display a user friendly message with all of the missing fields in one column. My issue is that I am unable to remove the trailing ", " from the text string that is produced. Is it possible to modify my DAX to drop the last two characters of the string?
Here is my current DAX:
Thank you!
Solved! Go to Solution.
@Anonymous Try:
QA Issue =
VAR __String = CONCATENATE(IF('Consolidated RAID Log'[Event]=BLANK(),"Missing Event, ",""),CONCATENATE(IF('Consolidated RAID Log'[Owner]=BLANK(),"Missing Owner, ",""),CONCATENATE(IF('Consolidated RAID Log'[Due Date]=BLANK(),"Missing Due Date, ",""),"")))
VAR __Result = IF(RIGHT(__String, 1) = ",", LEFT(__String, LEN(__String) - 1), __String)
RETURN
__Result
@Anonymous Try:
QA Issue =
VAR __String = CONCATENATE(IF('Consolidated RAID Log'[Event]=BLANK(),"Missing Event, ",""),CONCATENATE(IF('Consolidated RAID Log'[Owner]=BLANK(),"Missing Owner, ",""),CONCATENATE(IF('Consolidated RAID Log'[Due Date]=BLANK(),"Missing Due Date, ",""),"")))
VAR __Result = IF(RIGHT(__String, 1) = ",", LEFT(__String, LEN(__String) - 1), __String)
RETURN
__Result
Hi Greg,
Thank you so much for your quick reply. I had to make some small adjustments, but this was exactly what I needed!
I used your version and updated the Right function to look for a space and changed the - 1 to a - 2 to account for the additional space after the comma:
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 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |