March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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.
Solved! Go to Solution.
Hi @MEAlexander33 ,
You could add an index column group by the CAM column.
1.Group by, select All rows in the option.
2.Add a custom column to add the index.
3.Expand the column and create a custom column to return store level or G&A.
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.
Hi @MEAlexander33 ,
You could add an index column group by the CAM column.
1.Group by, select All rows in the option.
2.Add a custom column to add the index.
3.Expand the column and create a custom column to return store level or G&A.
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.
=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]))
@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?
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
16 | |
13 | |
13 | |
9 |
User | Count |
---|---|
36 | |
31 | |
20 | |
19 | |
17 |