Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
EmilijaN
Helper I
Helper I

How to keep one from two same ids with following rule

Hello,

 

I have one problem. 

I have one table which looks like this:

EmilijaN_0-1631035419801.png

 

I want to put some colunm(after to use like filter) when I find the same id with two different device_names, to choce Samsara. 

I have no blank fields for device_name.

Like in the picture there is id(441233) with Samsara nad Skybitz device_name, I want to deactivate rows where is Skytbits and only to use Samsara(has priority).

 

Any idea?

 

Thank youu so much!

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @EmilijaN ,

 

what is the business rule that determines that Samsara has priority over Skytbits?

 

In this article I describe how I use Power Query to create an index per group, the id: https://www.minceddata.info/2021/06/02/using-power-query-for-data-sampling/

 

Maybe you can adapt this approach and group by the id column and sort by the device name column, than you can filter for all the rows where the index column equals one.

 

Hopefully, this provides some ideas on how to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

1 REPLY 1
TomMartens
Super User
Super User

Hey @EmilijaN ,

 

what is the business rule that determines that Samsara has priority over Skytbits?

 

In this article I describe how I use Power Query to create an index per group, the id: https://www.minceddata.info/2021/06/02/using-power-query-for-data-sampling/

 

Maybe you can adapt this approach and group by the id column and sort by the device name column, than you can filter for all the rows where the index column equals one.

 

Hopefully, this provides some ideas on how to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.