Replace Column Values with Specific string

vishwanath muthuraman 1 Reputation point
2022-11-26T18:21:56.55+00:00

Can some one write a DAX query or script i could use to replace values in the "Sample" column if the "Platform" column contains the value "Google". i have attached an image below.

so here us is the condition:

IF platform column = " Google" THEN we need to check if Sample column value = "NB" if it does have NB among the cell contents then we replace with "Google Search".

Note - doesnt matter what the cell content is, if it contains NB in it we need to replace the whole cell to show "Google Search"

how do i do this ?

This is the query i have so far but it doesnt seem to work

IF (FIND("NB",'Publisher_Data_Main (2)'[sample],1,0)>0,"Google Search",'Publisher_Data_Main (2)'[campaign_name])

Table name - Publisher_Data_Main (2)

i have also tried this

IF('Publisher_Data_Main (2)'[platform] = "google", SWITCH( 'Publisher_Data_Main (2)'[campaign_name],"NB","Google Search","Search","Google Search" ) ,'Publisher_Data_Main (2)'[campaign_name])

264442-image.png

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
43,643 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.