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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
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.

Top Solution Authors