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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
comacabana
Frequent Visitor

Quarter Subtotals taking average and not last value in period for inventory turnover

Hi all,

 

You guys have been such a great resource for me and I really appreciate it. I'm learning a lot but theres still some things that I can't seem to get correct.

 

I have a matrix of inventory at the end of the month. inventory same period last year, total sales and lastly inventory turnover. I'll add an image of how it currently looks like. Everything seems to be working fine except for my inventory turnover formula. The quarterly subtotals takes the average of the previous 3 months instead of the last value of the period. Is there anyway around this? These are the formulas that I currently use: 

 

 

Turnover Ratio = 
    DIVIDE('_Measures Inventory'[Total Sales], '_Measures Inventory'[Sum Inventory Value])

 

 

 

Total Sales = 
    SUM('CustomerOrderLines 2019- July 2022'[Total Sales])

 

 

 

Sum Inventory Value = 
    SUM('2019 - 2022 Inventory Value'[Total Value])

 

 

comacabana_0-1660114779051.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@comacabana ,based on what I got

 

have column year month YYYYMM format and try measure like

 

calculate( lastnonblankvalue('Date'[Year Month]), SUM('2019 - 2022 Inventory Value'[Total Value]))

 

Column YYYYMM 

year month = format([Date], "YYYYMM")

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
comacabana
Frequent Visitor

@amitchandak You are the best thank you that worked perfectly! 

I slightly modified the formula to get turnover ratio in case anyone is interested.

 

CALCULATE(LASTNONBLANKVALUE('Date Table'[Year Month Number], DIVIDE(SUM('CustomerOrderLines 2019- July 2022'[Total Sales]),SUM('2019 - 2022 Inventory Value'[Total Value]))))
amitchandak
Super User
Super User

@comacabana ,based on what I got

 

have column year month YYYYMM format and try measure like

 

calculate( lastnonblankvalue('Date'[Year Month]), SUM('2019 - 2022 Inventory Value'[Total Value]))

 

Column YYYYMM 

year month = format([Date], "YYYYMM")

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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