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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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