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
CeiBob
Frequent Visitor

Beginner - Looking for a way to display and compare to value in dimensional table

Hello!

 

TLDR: I am looking for how to receive this result from the tables below.

When I select a location via a slicer, I want my card to show the QTY of models remaining. This is like stating value = Qty column value where model = 'amountdeployed'[Model]' yet I don't know how to set up that kind of query.

 

Fact Table: (amount deployed)

IDLocationModel
A1LA OfficeM23571
A2LA OfficeM21621
B1SeattleA525
B2SeattleA525
C1ChicagoM23571
C2Chicago

M23571

 

Dimensional Table: (amount remaining)

ModelQty
M235718
M216215
A5251

 

The relationship setup for this data is unimportant to me so I don't mind changing it. The only important thing is that I can get the data I want when I need it. My current data has over 10k devices and qty's and I just want to have a quick glimpse into the available quantity for this model. Whenever I have tried to pull the Qty value, it refuses to see the information in that table, and perhaps a function that solves this is something I am having trouble finding. 

 

I have been playing with these exact tables here and trying measures. So far I have not found a solution which can relate this data.

 

Any help is appreciated. Thanks!

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@CeiBob 

Create this measure. This will work with or without relationship 

Qty Remaining = 
IF(
    HASONEVALUE( 'amount deployed'[Location]),
    VAR __ModelSelected = VALUES( 'amount deployed'[Model] )
    RETURN
    CALCULATE(
        SUM('amount remaining'[Qty]),
        'amount remaining'[Model] IN __ModelSelected
    )
)

 

Fowmy_0-1705731470665.png

Fowmy_1-1705731483978.png

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@CeiBob 

Create this measure. This will work with or without relationship 

Qty Remaining = 
IF(
    HASONEVALUE( 'amount deployed'[Location]),
    VAR __ModelSelected = VALUES( 'amount deployed'[Model] )
    RETURN
    CALCULATE(
        SUM('amount remaining'[Qty]),
        'amount remaining'[Model] IN __ModelSelected
    )
)

 

Fowmy_0-1705731470665.png

Fowmy_1-1705731483978.png

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

CeiBob
Frequent Visitor

Fowmy,

 

Thank you for this reply. I have studied how this works and have found out how I can solve many different issues due to this information! 

 

-CeiBob

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.