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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Mastoda
Regular Visitor

SUM values in fact table, filtering by keys in dim table

Hi,

 

I have a DIM_TABLE with groups and subgroups of keys

DIM_TABLE:
Capture.JPG

and a FACT_TABLE with transactions values
FACT_TABLE:

Capture.JPG

 

I want to perform calculation in fact table based in KEY_GROUP

CALCULATION_A = KEY_GROUP 1 + KEY_GROUP 3

CALCULATION_A = 10+5+2 = 17


there's some easy way to do this?

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Mastoda,

 

You may refer to measure below.

Measure =
SUMX (
    FILTER (
        FACT_TABLE,
        LOOKUPVALUE (
            DIM_TABLE[KEY_GROUP],
            DIM_TABLE[KEY_SUBGROUP], FACT_TABLE[KEY_SUBGROUP]
        )
            IN { 1, 3 }
    ),
    FACT_TABLE[VALUE]
)
Community Support Team _ Sam Zha
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
v-chuncz-msft
Community Support
Community Support

@Mastoda,

 

You may refer to measure below.

Measure =
SUMX (
    FILTER (
        FACT_TABLE,
        LOOKUPVALUE (
            DIM_TABLE[KEY_GROUP],
            DIM_TABLE[KEY_SUBGROUP], FACT_TABLE[KEY_SUBGROUP]
        )
            IN { 1, 3 }
    ),
    FACT_TABLE[VALUE]
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.