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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
NBOnecall
Helper V
Helper V

Two Tables, bringing in data to the same visualization

Hi,

 

I have two set of data linked with the relationship seen here. Relationship 7.22.PNG

 

When trying to combine the tables I get either null value or $0.00 results back. I feel like this is an easy fix that I am just overlooking.

Average Value Matrix.PNG

Sales Matrix.PNG

The measures are the following;

 

AvgValue2 = ([MinValue]+[MaxValue])/2
MinValue = 
VAR Min1 = CALCULATE( SUM('ns InventorySnapshot'[Value]), FILTER('ns InventorySnapshot', 'ns InventorySnapshot'[InventoryDate] = MIN(Dimtime[Date]) ))
return
IF(ISBLANK(Min1), 0, Min1)
MaxValue = 
VAR Max1 = CALCULATE( SUM('ns InventorySnapshot'[Value]), FILTER('ns InventorySnapshot', 'ns InventorySnapshot'[InventoryDate] = MAX(Dimtime[Date]) ))
return
IF(ISBLANK(max1), 0, Max1)

And the rest are columns of data. In the end I would like to divide the Extended cost by the average value.

 

Thanks,

Noel

2 REPLIES 2
jdbuchanan71
Super User
Super User

Hello @NBOnecall 

I believe you are getting blanks because the MIN(Dimtime[Date]) is outside your data range.  If you don't have a time component selected it will pick the earliest date in your Dimtime table and calc against that.  Try this

MinValue = 
VAR Min1 = CALCULATE( SUM('ns InventorySnapshot'[Value]), FILTER('ns InventorySnapshot', 'ns InventorySnapshot'[InventoryDate] = MIN('ns InventorySnapshot'[InventoryDate]) ))
return
IF(ISBLANK(Min1), 0, Min1)
MaxValue = 
VAR Max1 = CALCULATE( SUM('ns InventorySnapshot'[Value]), FILTER('ns InventorySnapshot', 'ns InventorySnapshot'[InventoryDate] = MAX('ns InventorySnapshot'[InventoryDate]) ))
return
IF(ISBLANK(max1), 0, Max1)

 

I don't think the date is the issue. See on this example when bringing in Extended Cost it is bringing in the total for all item for that day. For some reason the Item Internal ID isn't being associated correctly, but looking at the relationship it doesn't seem to be wrong?

InternalId not being filtered.PNG

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors