Showing results for 
Search instead for 
Did you mean: 

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

Super User
Super User

Calculate unit price by supply

Hi all!


This must be an easy question to solve, but I'm not clear today and I'm a bit stuck on this.

I have some rows with the consumption for a lot of different supplies and the price I had paid for the invoice in € over years.


What I want is to define a formula which calculates the unity price I'm paying to make a comparison between years and months. For instance the price of the KWh if I have selected electricity in my slicer.


Data is structured in this way (of course I have dim tables for center, dates and type of cons):


CenterDateConsumptionInvoice total paidType of cons.


I think the calculus must be done with sumx and divide (price/consumption), selectedvalue for type of cons. but I'm struggling with it.


Thank you in advance.

Super User
Super User

This looks straightforward.  



where are you stuck?

Hi @lbendlin 


Yes, I got your formula, but total is not correct. Therefore, I was trying to use some kind of sumx

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

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

Power BI Fabric Summit Carousel

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