Forum Discussion
classify according row
hello ,
I need our help please !
Descriptions
| location | Gabarit | Brand | NewBrand |
| T1 | A256 | DA | other |
| T1 | D456 | DI | DI |
| T1 | F5335 | DA | other |
| T2 | C5679 | DA | other |
| T2 | D5678 | DI | DI |
| T2 | F6543 | DA | other |
| T3 | D07766 | DI | DI |
| T3 | F755 | DA | other |
| T3 | H6567 | DA | other |
| T4 | D643 | DI | DI |
| T4 | G665 | DA | other |
| T5 | D543 | DI | DI |
| T6 | D098 | DI | DI |
| T6 | Z5433 | DA | other |
| T6 | E9876 | DA | DI |
| T7 | F567 | DA | DA |
| T8 | S654 | DA | DA |
| T9 | D986 | DI | DI |
| T10 | A285 | DA | DA |
| T11 | O943 | DA | DA |
For start i have for information Location , Gabarit , Brand
For the same Location if we have several Gabarit and one of the Gabarit starts with "D" then the new Brand will be "DI" and the rest of the Gabarit of the same Location will have as new Brand "Other"
If for a Location we have no Gabarit starting with "D" then the new brand will be unchanged
Thank you for your help.
Stevefranck Good to know it solved your problem. Kindly mark my solution as accepted solution so that it will help other to find it more quickly. 😊
4 Replies
- Samarth_18Community Champion
Hi Stevefranck ,
Please try this:-
New Brand = VAR _count = CALCULATE ( COUNT ( 'Table (2)'[location ] ), FILTER ( ALL ( 'Table (2)' ), 'Table (2)'[location ] = EARLIER ( 'Table (2)'[location ] ) ) ) VAR _gabrit = IF ( LEFT ( 'Table (2)'[Gabarit], 1 ) = "D", "DI", "other" ) RETURN IF ( _count = 1, 'Table (2)'[Brand], _gabrit )output:-
Thanks,
Samarth
- StevefranckFrequent Visitor
Hello,
Thank you very much, it works very well
Steve.
- Samarth_18Community Champion
Stevefranck Good to know it solved your problem. Kindly mark my solution as accepted solution so that it will help other to find it more quickly. 😊