Forum Discussion
remove delimiter if combinevalues empty
I have a large COMBINEVALUES doing combination of Ifs...but when there results all return false, it returns "" for the ifs, so the combinevalues resutls returns the delimiter only. How do I not return the delimiter for empty values without repeating all the ifs over again?
5 Replies
- AnonymousNot applicable
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- AnonymousNot applicable
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.
- parry2kSuper 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