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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AllanBerces
Post Prodigy
Post Prodigy

Lookup base from Two Column

Hi Good day, 

Pls need help on Lookupvalue or any other way to have the result i need. I have two table table 1 Require and Table 2 avialble. I want to have ACTUAL AVAI. and PENDING Column base from Task and Article Column. For Pending If available is greaterthan required = 0 instead of negative value.

AllanBerces_0-1717069137792.png

Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AllanBerces,

You can try to use the following calculated table expression to create a new table to show expected results if it suitable for your requirement:

NewTable =
ADDCOLUMNS (
    SUMMARIZE (
        ALLSELECTED ( Table1 ),
        [Task],
        [Article],
        [Required],
        "Available",
            CALCULATE (
                SUM ( Table2[Available] ) + 0,
                FILTER (
                    ALLSELECTED ( Table2 ),
                    Table2[Task] = [Task]
                        && Table2[Article] = [Article]
                )
            )
    ),
    "Pending",
        IF ( [Required] - [Available] > 0, [Required] - [Available], 0 )
)

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @AllanBerces,

You can try to use the following calculated table expression to create a new table to show expected results if it suitable for your requirement:

NewTable =
ADDCOLUMNS (
    SUMMARIZE (
        ALLSELECTED ( Table1 ),
        [Task],
        [Article],
        [Required],
        "Available",
            CALCULATE (
                SUM ( Table2[Available] ) + 0,
                FILTER (
                    ALLSELECTED ( Table2 ),
                    Table2[Task] = [Task]
                        && Table2[Article] = [Article]
                )
            )
    ),
    "Pending",
        IF ( [Required] - [Available] > 0, [Required] - [Available], 0 )
)

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.