Forum Discussion
remove delimiter if combinevalues empty
Hey Anonymous
It would help if you put the current DAX you are using.
In general, you can wrap an IF statement arround your DAX.
e.g.
IF(YOUR_DAX = "YOUR_DELIMITER", BLANK(), YOUR_DAX)
Good Luck!
A
Yeah, the reason i didn't is because it's really long.
It's basically Switch(condition,
IF statement,
IF statement,
IF statement,
IF statement with combinevalues(", ", if statement, if statement, if statement, if statement, if statement, if statement)
IF statement,
IF statement,
IF statement,
IF statement,
)
If all those if statements inside combinevalues return as false (false condition returning ""), then combinevalues returns ",,,," as the result. Which is correct, but I don't want those delimiters? i want it to return "". And I don't want to have to repaste the if statements and make it twice as long suddenly.
- parry2k7 years ago
Super User
Anonymous please share sample data with expected output.
Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 - Anonymous7 years agoNot applicable
Hi Anonymous
Try the folllowing and add an IF statment
IF(combinevalues(", ", if statement, if statement, if statement, if statement, if statement, if statement) = ",,,,", BLANK(), combinevalues(", ", if statement, if statement, if statement, if statement, if statement, if statement))This will put a blank insted of ",,,,".
You can replace the BLANK() with "" if needed, for an empty string/text.
Good Luck!
A- Anonymous7 years agoNot applicable
Thanks AClerk, I get that, the thing is I want to specifically not do it that way because doesn't it then need to process twice? When hitting a bunch of records, that seems like I'm doubling my resource usage.
Isn't there a method of testing the result afterwards, like if(result = ",,,", "", result) ?