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

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

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

Jacklyn_1-1669885020094.png

 

Thanks!

 

2 REPLIES 2
Mahesh0016
Super User
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)
Mahesh0016
Super User
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.


Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors