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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Regular Visitor

How to correlate more rows in the same table with unique ID


in a table (SQL database) I have the double-entry bookkeeping (accounting movements) as shown in the attached figure:

Immagine 2021-11-15 150255.png














I want to correlate all the movements on the basis of the "registration ID" column (column A), in order to understand which customers have determined my revenues. I try to report another figure to make you understand what I mean:

Immagine 2021-11-15 150518.png




It's possible to to that with Power BI?



Community Support
Community Support

HI @S2861926,

It seems like you want to use the customer code to register with all movements descriptions, then you can simply summary these records with specific customers.

If that is the case, I'd like to suggest you create a calculated column to loop records based on the current 'registration ID' group to find out the corresponding user to tag these records.

User =
    CONCATENATEX ( VALUES ( 'Table'[Description] ), [Description], "," ),
    FILTER (
        'Table'[Registration ID] = EARLIER ( 'Table'[registration ID] )
            && SEARCH ( "33.05.11", 'Table'[Account Code], 1, -1 ) > 0


Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Regular Visitor

I had thought about creating a "dimension table" but I would like a model that is always updated automatically ... let me explain.
If I create a pivot table with "Registration ID" and "Customer Name" it can be fine for the data I'm working on now, but tomorrow, for example by increasing the number of registrations (Reg.ID) or new customers (Customer Name) I should always recreate a new table to import into my "dimension table". I would like a system that automatically updates itself starting from the data contained in my SQL server ...
I had tried (with poor results)

So doesn't have to be static you can make a dynamic table ,a portion of your current query/table  , something like this:


Select Distict Registration ID, Customer Name,

from Table




sorry but i can't understand what you mean ... could you be more specific?

Hi @S2861926,

I mean you can add a calculated column to store the customer that extract from each registration ID group.

Then you can use this field to create a table visual with the above field and 'debit' and 'credit' fields.

For the displayed value type, you can add a filter with the 'description' field to control which one is displayed on the visual.


Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Post Patron
Post Patron

I would create a dimension table with the Registration ID and Customer Name. Then Join on the back End or create relationship in the front end.

Helpful resources

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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


Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors