cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper IV

## Two Measures - two different results

Hi All,

I am producing a Matrix that shows customer deliveries of fuel for each month of the year.

I also have a second page with various tables and graphs including one that sums the gallons by category (product). There are two different measures being used.  The 'Adj Qty' has the correct quantity for '01C Commercial Propane' and the other, 'Gallons', has the correct value for '01R Residential Propane'. Other values are correct.

I can't seem to get a measure to get the correct values for all products.

Here are the two measures.

Adj Qty = SUMX(History,History[qty] * RELATED(category[inv_multiplier]))

Could someone help with a measure that will provide the correct values for all products?

Here is the model.

Thanks much,

Bud

1 ACCEPTED SOLUTION
Super User

You could add a measure like this:

``````Mixed Unit Value =
CALCULATE (
KEEPFILTERS ( category[CATEGORY] = "01C" )
) +
CALCULATE (
[Gallons],
KEEPFILTERS ( category[CATEGORY] <> "01C" )
)``````

It calculates measure [Adj Qty] for category 01C and [Gallons] for all other categories.

Super User

You could add a measure like this:

``````Mixed Unit Value =
CALCULATE (
KEEPFILTERS ( category[CATEGORY] = "01C" )
) +
CALCULATE (
[Gallons],
KEEPFILTERS ( category[CATEGORY] <> "01C" )
)``````

It calculates measure [Adj Qty] for category 01C and [Gallons] for all other categories.

Announcements

#### Power BI Monthly Update - November 2023

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

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors