Replace Column Values with Specific string
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])