Forum Discussion
Retrive text from other column in direct query
- 5 years ago
TaufikMaggangka , You might able to get complex logic work at the column level, You have to create a measure. You can use search or find or containsstring
- 5 years ago
Hi v-yalanwu-msft ,
Thank you so much. This is give me a clue.
but I have another issues since I also want replace value of "fever" to "Fever", cough to "Cough"(basically I want to first alfabet is Capital) not only loss of smell will be replace.
I try your sollustion, like this, but doesnt work. your future help will be appriciated.Measure = var _replace=SUBSTITUTE(MAX([CovidSymptoms])," ",",") return SUBSTITUTE(_replace,"lossofsmel","loss of smel") return SUBSTITUTE(_replace,"fever","Fever") return SUBSTITUTE(_replace,"cough","Cough") - 5 years ago
Hi, TaufikMaggangka ;
You could change measure as follows:
Measure = var _a=SUBSTITUTE(MAX([CovidSymptoms])," ",",") var _b=SUBSTITUTE(_a,"lossofsmel","loss of smel") var _c=SUBSTITUTE(_b,"fever","Fever") return SUBSTITUTE(_c,"cough","Cough")Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for trying to help, but this is not working in "Direct Query mode"
Hi, TaufikMaggangka ;
If your .pbix is "Direct Query mode" , you should use dax (create a measure )as follows:
Measure = var _replace=SUBSTITUTE(MAX([CovidSymptoms])," ",",")
return SUBSTITUTE(_replace,"lossofsmel","loss of smel")
he final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- TaufikMaggangka5 years ago
Helper II
Hi v-yalanwu-msft ,
Thank you so much. This is give me a clue.
but I have another issues since I also want replace value of "fever" to "Fever", cough to "Cough"(basically I want to first alfabet is Capital) not only loss of smell will be replace.
I try your sollustion, like this, but doesnt work. your future help will be appriciated.Measure = var _replace=SUBSTITUTE(MAX([CovidSymptoms])," ",",") return SUBSTITUTE(_replace,"lossofsmel","loss of smel") return SUBSTITUTE(_replace,"fever","Fever") return SUBSTITUTE(_replace,"cough","Cough")- v-yalanwu-msft5 years ago
Community Support
Hi, TaufikMaggangka ;
You could change measure as follows:
Measure = var _a=SUBSTITUTE(MAX([CovidSymptoms])," ",",") var _b=SUBSTITUTE(_a,"lossofsmel","loss of smel") var _c=SUBSTITUTE(_b,"fever","Fever") return SUBSTITUTE(_c,"cough","Cough")Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- TaufikMaggangka5 years ago
Helper II
Thank you so much. this is a sollution.