Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All,
The sample data is attached below. The column "PG Original" is the main column to be considered.
Step 1 - For Countries which have "MOSE Service" in PG original, Should be matched with "MOSE Service" in PG Derived and Flag should be 1, for rest flag should be 0.
Step 2 - For Countries which dont have "MOSE Service" data in PG Original, should be compared by their PG Values & MOSE Service. (say) For Country "Austria", there is no MOSE Service data. For that country, flag should be 1 for "Drives"(PG Original) & "Drives"(PG Derived) and "Drives"(PG Original) & "MOSE"(PG Derived), and rest as 0. Similary for Motors service.
| Country | PG Original | PG Derived | Flag |
| Austria | Drives Service | Drives Service | 1 |
| Austria | Drives Service | MOSE Service | 1 |
| Austria | Drives Service | Motors Service | 0 |
| Argentina | MOSE Service | Drives Service | 0 |
| Argentina | MOSE Service | MOSE Service | 1 |
| Argentina | MOSE Service | Motors Service | 0 |
| Austria | Motors Service | Drives Service | 0 |
| Austria | Motors Service | MOSE Service | 1 |
| Austria | Motors Service | Motors Service | 1 |
I need the flag value to be created as shown in the above table. Please provide the solution/approach to resolve this.
Thanks in advance !!
Solved! Go to Solution.
Hi @Anonymous
You can create a custom column with below code:-
FLag =
IF (
OR (
Country_data[PG Derived] = Country_data[PG Original],
Country_data[PG Derived] = "MOSE Service"
),
1,
0
)Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Anonymous
You can create a custom column with below code:-
FLag =
IF (
OR (
Country_data[PG Derived] = Country_data[PG Original],
Country_data[PG Derived] = "MOSE Service"
),
1,
0
)Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.