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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
efeiles
Frequent Visitor

Dynamic Column calculation based on Slicer Selection

I work at a manufacturing company and we are trying to understand quantities of parts used over time.  I have a matrix table with part number as the dimension.  I have a beginning value (qty on hand at the beginning of the year.  I sum the stuff we have received over time and how much we have used over time.  My final is what we are reporting as current on hand qty.  My table for this has the part number, date, and qty.  

 

I am trying to only have the max on hand qty show in the table based on the part number selected and the time period selected.  Currently it just wants to sum up all on hand qty over time.

 

How do I just get the max "current on hand qty" based on part selection and/or Date selection?

 

I only want the 5,908.27 to show on the CurrentOnHandQtyQty.PNG

1 ACCEPTED SOLUTION
efeiles
Frequent Visitor

Well I actually finally searched enough and found the answer that worked for me.

 

= CALCULATE(MAX(EndingQty[CurrOnHandQty]),DATESBETWEEN(DateTable[PeriodBegDt].[Date],MAX(DateTable[PeriodBegDt]),MAX(DateTable[PeriodBegDt])))

View solution in original post

1 REPLY 1
efeiles
Frequent Visitor

Well I actually finally searched enough and found the answer that worked for me.

 

= CALCULATE(MAX(EndingQty[CurrOnHandQty]),DATESBETWEEN(DateTable[PeriodBegDt].[Date],MAX(DateTable[PeriodBegDt]),MAX(DateTable[PeriodBegDt])))

Helpful resources

Announcements
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.