Forum Discussion
Separate 2 categories in 2 rows with the same code
I'am trying to create two different categories, one to identify when VN A=1; in this case the name of the category would be "Sales VN A" and tother one to identify when VN VW=1; in this case the name of the category would be "Sales VN VW. However, when one code (Código instalacion) has VN A=1 and VN VW=1, I would need to separate the code into 2 different rows: One with the category "Sales VN A" and other with "Sales VN VW".
How could I do it?
Thank you
Xavi
2 Replies
- amitchandakSuper User
Anonymous , You need to create a new column in power query
if [VN A] =1 && [VN VW] <> 1 then "Sales VN A"
else if [VN A] <> 1 && [VN VW] = 1 then "Sales VN VW"
else "Sales VN A ],Sales VN VW"
then split this column by delimiter (,) into rows
Split Column Power Query: https://youtu.be/FyO9Vmhcfag
https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/
- AnonymousNot applicable
Hey guy,
I have problems with the &&. I get an error.
Do you know what could happen?
Thank you