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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
vpastor
Frequent Visitor

Query with row values

Hello everyone

 

I am desperate and do not know how I can realize the following:

 

I have two tables:

 

G_L Entry (1 table)

GL Account NoAmount
1700005000 €
2100003500 €
5200001000 €
5202222000 €
1740005000 €
5200008000 €
5500001000 €

 

Acc_ Schedule Line (2 table)

Totaling
170|520|174|5200|5500

 

The totaling field is a text string composed of several values, for example (170|520|174|524|5200|5500).

I need to make a formula that is able to read those values and add the "Amount" when the "GL Account No" starts with one of the values we have read from the "Totaling" column.

 

For example this measure return this:

22.000 €

 

Thank you very much to all of you.

 

Regards
Vicente

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @vpastor ,

 

1. In the power query editor, separate the TOTAL values.

vkaiyuemsft_0-1720773443177.png

 

2. Hold down the CTRL key and select all columns, inverse perspective columns.

vkaiyuemsft_1-1720773472211.png

 

3.Create measure.

Measure2 = 
VAR _vtable =
    FILTER (
        CROSSJOIN ( 'Table', 'Table2' ),
        FIND (
            FIXED ( 'Table2'[Value], 0, 2 ),
            FIXED ( 'Table'[GL Account No], 0, 2 ),
            ,
            BLANK ()
        )
            <> BLANK ()
    )
RETURN
    SUMX ( SUMMARIZE ( _vtable, [Amount], [GL Account No] ), [Amount] )

vkaiyuemsft_2-1720773515060.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

2 REPLIES 2
Anonymous
Not applicable

Hi @vpastor ,

 

1. In the power query editor, separate the TOTAL values.

vkaiyuemsft_0-1720773443177.png

 

2. Hold down the CTRL key and select all columns, inverse perspective columns.

vkaiyuemsft_1-1720773472211.png

 

3.Create measure.

Measure2 = 
VAR _vtable =
    FILTER (
        CROSSJOIN ( 'Table', 'Table2' ),
        FIND (
            FIXED ( 'Table2'[Value], 0, 2 ),
            FIXED ( 'Table'[GL Account No], 0, 2 ),
            ,
            BLANK ()
        )
            <> BLANK ()
    )
RETURN
    SUMX ( SUMMARIZE ( _vtable, [Amount], [GL Account No] ), [Amount] )

vkaiyuemsft_2-1720773515060.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

 

vpastor
Frequent Visitor

Ok, i have edited my message 😉

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.