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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ChrisR22
Helper III
Helper III

Filtering duplicates when splitting column into rows

Hello, 

 

I have a dataset similar to the following

Project IDOwnerCategoryHours
1Adam Apple, Orange, Pear5
2SusanCarrot12
3JohnOrange, Carrot3
4AdamApple, Carrot7

 

In order to create visuals based on the category, I have to split the data rows by delimeter, resulting in the following

Project IDOwnerCategoryHours
1Adam Apple5

1

AdamOrange5

1

AdamPear5
2SusanCarrot12
3John

Orange

3

3JohnCarrot3
4AdamApple7
4AdamCarrot7

 

However, this makes it difficult to create a visual based on the owner data and hours. 

I am looking to create a chart that shows the breakdown of hours per owner, but disregarding the duplicate values and only counting on a per project basis.

 

Ex. When looking at Adam's total hours it should be 5+7 =12. And when looking at total hours spent on Carrot it should be 12+3+7 = 22. 

 

If anyone has any insight into this please let me know, thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ChrisR22 ,

Depending on the information you provided, you can follow these steps below:

1.Add an index column.

vyifanwmsft_0-1710296321884.png

2.Add new column.

OwnerChosen = 
VAR _rank =
    RANKX (
        FILTER ( 'Table', 'Table'[Project ID] = EARLIER ( 'Table'[Project ID] ) ),
        'Table'[Index],
        ,
        ASC
    )
RETURN
    IF ( _rank = 1, 'Table'[Hours] )

3.Add new measure.

Total = 
IF (
    ISFILTERED ( 'Table'[Owner] ),
    SUM ( 'Table'[OwnerChosen] ),
    SUM ( 'Table'[Hours] )
)

Final output:

vyifanwmsft_3-1710296507573.png

vyifanwmsft_4-1710296529902.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @ChrisR22 ,

Depending on the information you provided, you can follow these steps below:

1.Add an index column.

vyifanwmsft_0-1710296321884.png

2.Add new column.

OwnerChosen = 
VAR _rank =
    RANKX (
        FILTER ( 'Table', 'Table'[Project ID] = EARLIER ( 'Table'[Project ID] ) ),
        'Table'[Index],
        ,
        ASC
    )
RETURN
    IF ( _rank = 1, 'Table'[Hours] )

3.Add new measure.

Total = 
IF (
    ISFILTERED ( 'Table'[Owner] ),
    SUM ( 'Table'[OwnerChosen] ),
    SUM ( 'Table'[Hours] )
)

Final output:

vyifanwmsft_3-1710296507573.png

vyifanwmsft_4-1710296529902.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors