This explanation of the change you want to make is very hard to follow.
In any case you should include a input data in the form of a reprex, which you have done, and the output you expect also in the form of a reprex. That would give us something to compare the output of code we might suggest.
In any case this is my guess at what you are trying to do.
suppressPackageStartupMessages(library(tidyverse))
customer_id<-c("AAP", "AAP", "AAP", "AAP", "AAP", "AAP", "AMS", "AMS", "AMS", "AMS")
partner_id<-c("AAS", "AAS", "AAS", "AAS", "AAD", "AAD", "ADP", "ADP", "AXP", "AXP")
category<-c(3,1,1,2,1,3,3,1,2,1)
location<-c("Melbourne", "Silicon Valley", "Sydney", "Sydney", "Sydney", "Sydney", "New York", "New York", "Dallas", "Dallas")
tbl <- dataset<- data.frame(customer_id, partner_id, category,location)
tbl %>% group_by(customer_id, partner_id, location) %>%
mutate(category = if_else(category == 1, max(.$category), category))
#> # A tibble: 10 x 4
#> # Groups: customer_id, partner_id, location [6]
#> customer_id partner_id category location
#> <fct> <fct> <dbl> <fct>
#> 1 AAP AAS 3. Melbourne
#> 2 AAP AAS 3. Silicon Valley
#> 3 AAP AAS 3. Sydney
#> 4 AAP AAS 2. Sydney
#> 5 AAP AAD 3. Sydney
#> 6 AAP AAD 3. Sydney
#> 7 AMS ADP 3. New York
#> 8 AMS ADP 3. New York
#> 9 AMS AXP 2. Dallas
#> 10 AMS AXP 3. Dallas
Created on 2018-03-07 by the reprex package (v0.2.0).