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 have the following COMBINEVALUES that concatenates multiple flags into one field to get all the flags in one place. I added a UNICHAR for line break and it works fine, however still shows a blank line when the flag is blank.
How could I write this so that it only combines the non blank flags?
Thanks a lot for your help
Solved! Go to Solution.
How about:
qcheck total flag text =
VAR dealsize = 1
VAR dealscore = BLANK ()
VAR R4Q = 3
VAR owner = 4
VAR FlagList =
FILTER (
{
dealsize,
dealscore,
R4Q,
owner
},
NOT ISBLANK([Value])
)
VAR Result =
CONCATENATEX (
flaglist,
[Value],
"|"
)
RETURN
Result
Hi @bcdobbs
Thank you so much for your reply!
It looked promising however maybe because I am using UNICHAR(10) as a line break still shows 'blank lines'
I tried with a separator instead and it works, however it keeps the separator in the string ex
|||drivers||
Obivously expected would be to only keep the values non blank.. I tried to use FILTER/ISNONBLANK without luck,
Appreciate the help again!
Thank you
Quentin
Hi Quentin,
Are you just using it in a card visual? Could you send a screen shot of the output? I didn't get blank lines with my test measure.
Will do some more testing my end as well.
I am using it in a Matrix, as 'Values' example with | separator
With UNICHAR
How about:
qcheck total flag text =
VAR dealsize = 1
VAR dealscore = BLANK ()
VAR R4Q = 3
VAR owner = 4
VAR FlagList =
FILTER (
{
dealsize,
dealscore,
R4Q,
owner
},
NOT ISBLANK([Value])
)
VAR Result =
CONCATENATEX (
flaglist,
[Value],
"|"
)
RETURN
Result
Legend.
Thank you so much for your help! It's humbling to see how good people are at this.
Have a great evening
Quentin
I'd create a table variable with your existing variables and then use CONCATENATEX to iterate over the table which will ignore blanks:
(Put your existing logic back in for the original variables)
qcheck total flag text =
VAR dealsize = 1
VAR dealscore = BLANK ()
VAR R4Q = 3
VAR owner = 4
VAR FlagList =
{
dealsize,
dealscore,
R4Q,
owner
}
VAR Result =
CONCATENATEX (
flaglist,
[Value],
UNICHAR ( 10 )
)
RETURN
Result
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |