Forum Discussion
CesiCash
8 years agoRegular Visitor
Sum two columns if third column contains text
H there, I want to do a simple calculation which seems to be pretty easy in Excel but i dont get the solutions in PBI. I have column A which has names in it. The value in Column B and C shou...
- 8 years ago
Hi CesiCash,
Based on my test, you could refer to below steps:
Sample data:
Create the calculated column:
Column = var a=IF(IFERROR(SEARCH("ing",[A]),BLANK())<>BLANK(),TRUE(),FALSE())||IF(IFERROR(SEARCH("fy",[A]),BLANK())<>BLANK(),TRUE(),FALSE()) return IF(a=TRUE(),[B]+[C],[B])Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
CesiCash
8 years agoRegular Visitor
Hi abbasabdulla
Unfortunately there is no text.contains function in powerbi?
Is there any other idea?
Best
Carina
abbasabdulla
8 years agoFrequent Visitor
Hi, I don't know which powerbi products do you test my function in, I have tested it using Power BI Desktop Version: 2.41.4581.361 64-bit (November, 2016) Check the below Pibx file I worked on. https://drive.google.com/open?id=12RIcR-QVFB1waMO2w56n4OD9iq8byHcD