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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
MEAlexander33
New Member

Duplicated Values - Need Assistance

Hi all.  

 

I am rather new with Power BI and have a quick question for you all.   I have a data set where in one column there are a couple of duplciated values.   It is a financial data set, where for example, we have two CAM accounts, one for store level and one for G&A.   In the data set I am using, unforuntalty I only have access to account descriptions rather than GL accounts.  In the CAM section, I need a way to identify the first CAM account as store level and the second as G&A, that way I only have unique accounts in my data set.   Below is an example of how the data set is layed out.  Screenshot 2022-09-13 144727.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MEAlexander33 ,

 

You could add an index column group by the CAM column.

1.Group by, select All rows in the option.

vstephenmsft_0-1663148270004.png

vstephenmsft_1-1663148347989.png

vstephenmsft_2-1663148357557.png

 

2.Add a custom column to add the index.

vstephenmsft_4-1663148426416.png

vstephenmsft_3-1663148414526.png

3.Expand the column and create a custom column to return store level or G&A.

vstephenmsft_5-1663148519469.png

vstephenmsft_6-1663148614787.png

vstephenmsft_7-1663148620565.png

 

 

Best Regards,

Stephen Tao

 

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

4 REPLIES 4
Anonymous
Not applicable

Hi @MEAlexander33 ,

 

You could add an index column group by the CAM column.

1.Group by, select All rows in the option.

vstephenmsft_0-1663148270004.png

vstephenmsft_1-1663148347989.png

vstephenmsft_2-1663148357557.png

 

2.Add a custom column to add the index.

vstephenmsft_4-1663148426416.png

vstephenmsft_3-1663148414526.png

3.Expand the column and create a custom column to return store level or G&A.

vstephenmsft_5-1663148519469.png

vstephenmsft_6-1663148614787.png

vstephenmsft_7-1663148620565.png

 

 

Best Regards,

Stephen Tao

 

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

 

 

 

 

wdx223_Daniel
Community Champion
Community Champion

=Table.ReverseRows(Table.Combine(Table.Group(Table.ReverseRows(PrevousStepName),"account_description",{"n",each Table.SplitColumn(Table.Skip(_),"account_description",(x)=>{[account_description]{0},x},{"level1","level2"}),0,(x,y)=>Byte.From(Text.StartsWith(y,"Total")))[n]))

Greg_Deckler
Community Champion
Community Champion

@MEAlexander33 So if it is a matter of order, you will need to add an Index so you can identify "first". Otherwise, what is the criteria for how you would identify which is which?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Yes it is a matter of order.  In my example, the first CAM identified for each time_key and store_id would be the store level acocunt and the second would the the G&A level account.   

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.