Forum Discussion
Filter text in Power Bi using DAX
Hi,
Can you help me how to create a table B from table A using DAX that includes only rows for customer id's that contain only the string price w/o th word standard. IS it helpful to use the NOT(CONTAINSSTRING) function here?
table A
| id | text |
| 111 | standard price for the product |
| 112 | standard for the product |
| 113 | price for the product |
table B
| id | text |
| 113 | price for the product |
Any assistance would be helpful.
Thank you.
3 Replies
- DataVitalizerSuper User
Hi pbi_data
Excatly, you can use NOT(CONTAINSSTRING) to create your calculated table as belowNewTable =
SUMMARIZE(
FILTER(
'OriginalTable',
NOT(CONTAINSSTRING('OriginalTable'[text],"standard")))
,'OriginalTable'[id],
'OriginalTable'[text])Did it work ? 👍 A kudos would be appreciated 📢 Mark it as a solution to help spreading knowledge
- pbi_dataFrequent Visitor
Thank you so much,it works.
In addition to this, I need some more help. I want to display in in one table visuals the following result: show only customer_ids that satisfy this condition: if there is a row with the text 'Non ref replaced' and for the same customer a row 'Standard price', show only this row 10000 Non Ref replaced.
In other table visual : if there is only Non Ref or NonRef and no other values in Key words column show only the custmer id only once.
customer_id KeyWords 10000 Standard Price 10000 Non Ref 10000 Non Ref replaced 10000 NonRef Any assistance would be appreciated.
- DataVitalizerSuper User
I need to understand more the new request.
In case you have the above example, customer_id 10000 with the four keywords, can you tell me what is the value to prioritize, something like this:
customer_id KeyWords 10000 Standard Price 3 10000 Non Ref 1? 10000 Non Ref replaced 2 10000 NonRef 1?
Did it work ? 👍 A kudos would be appreciated 📢 Mark it as a solution to help spreading knowledge