cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Frequent Visitor

## How to calculate Monthly Average Price for different Fuel type

Hello everyone!

I am hoping I could get some help regarding this. I need to create a line chart to show how the fuel price has affected us over the last 2 years, based on our company monthly fuel spend & quantity. We have 3 fuel types, Diesel, 91 Unleaded and Premium. How do I calculate monthly average rate for each fuel type, by using Amount \$ / Quantity.

Here is some of the data.

Thanks!

2 REPLIES 2
Super User
Monthly Flue Type Avg =
VAR Total_Amt = CALCULATE(SUM('Table'[2022 Amount (Excl GST)]),ALLEXCEPT('Table','Table'[Fuels]))

VAR Total_Qty = CALCULATE(SUM('Table'[2022 Quantity]),ALL('Table'))

RETURN
DIVIDE(Total_Amt,Total_Qty,0)
Super User
Monthly Flue Type Avg =
VAR Total_Amt = CALCULATE(SUM('Table'[2022 Amount (Excl GST)]),ALLEXCEPT('Table','Table'[Fuels]))

VAR Total_Qty = CALCULATE(SUM('Table'[2022 Quantity]),ALLEXCEPT('Table','Table'[Fuels]))

RETURN
DIVIDE(Total_Amt,Total_Qty,0)

Hi,
I hope above Solution is Helpful, Try It.

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors