Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
TaufikMaggangka
Helper II
Helper II

concatenate Text in direct query mode

Hi all,

I need help from expert about concenate text in direct query mode.

I need to create a new column based on several conditions or if statements into new column. Here the illustration of the table that I have, I named it "staging Screening"

 

FeverSkinChangesLethargyDryMounth
5truefalsetrue 
6truefalsetrue
3falsetruetrue
2truefalsefalse
2falsetruefalse


note for if statements:
If "fever"column more than 5, the result text will be "Fever more than 5 days"
if "skinchanges" is "is true, then result text will be "Rash on student skin"
if "lethargy" is "true", then text will be "Very sleepy"
if "drymounth" is "true", the text will be"Mouth very dry"

I hope the result of new column below, if using case above will be like this:

 

FeverSkinChangesLethargyDryMounthnewcolumn
5truefalsetrue Fever more than 5 days, Rash on student skin, Mouth very dry
6truefalsetrueFever more than 5 days, Rash on student skin, Mouth very dry
3falsetruetrueVery sleepy,Mouth very dry
2truefalsefalseRash on student skin
2falsetruefalseVery sleepy


Please also note that i am working with power query mode, I already try text combine function but not allowed if the statement more than 5. 

I also try with combine value function but there are delimiter if the result is blank: here the dax that I used and result :
Capture45.PNGCapture46.PNG
any help from expert will be really appreciated.

Thank you

4 REPLIES 4
Samarth_18
Community Champion
Community Champion

Hi @TaufikMaggangka ,

 

You can create a column with below code:-

 

Column = 
var fevercheck = IF('Table (8)'[Fever] > 5,"Fever more than 5 days",BLANK())
var skincheck = IF('Table (8)'[SkinChanges] = TRUE(),"Rash on student skin",BLANK())
var lethrgycheck = IF('Table (8)'[Lethargy] = TRUE(),"Very sleepy",BLANK())
var drymounthcheck = IF('Table (8)'[DryMounth] = TRUE(),"Mouth very dry",BLANK())
var listsymptom = {fevercheck,skincheck,lethrgycheck,drymounthcheck}
RETURN
  CONCATENATEX(
      FILTER(listsymptom,[Value]<>""),
      [Value],
      ","
  )

 

Samarth_18_0-1626272874143.png

 

Thanks

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

HI @Samarth_18 , 

Thank you for trying to help. 
But in any reason "concatenatex" not working or cannot be found in "direct query mode". Please see my screenshoot below. I also read here : https://community.powerbi.com/t5/Report-Server/DAX-Function-CONCATENATEX-is-not-supported-on-PBIRS-D...
which explain that  "concatenatex" doesnt support in direct query mode.

Your future support will be really appreciated @Samarth_18 
Capture1111111.PNG

Hi @TaufikMaggangka 

 

You can create a custom column with below code in transform data window.

 

= let 
fevercheck = if [Fever] > 5 then "Fever more than 5 days" else null,
skincheck = if [SkinChanges] = true then "Rash on student skin" else null,
lethrgycheck = if[Lethargy] = true then "Very sleepy" else null,
drymounthcheck = if[DryMounth] = true then "Mouth very dry" else null,

symptomslist = Text.Combine({fevercheck,skincheck,lethrgycheck,drymounthcheck},",")

in symptomslist

 

Thanks

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Hi @Samarth_18 ,

Thank you again trying to help,

I have tried your suggestion but This query contains transformations that can't be used for DirectQuery. Its why I try to add column or measure to fix this.

Do you have any other suggestion to solve this ? I have try with new column but there delimiter show if the result is blank, Do you have any suggestion about this ? how to ingore blank in Combine value function. Please see atatched above to see my syntax.

Your future help will be really appreciated, stress about this.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.