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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Pfin
Frequent Visitor

Calculate Minimum Over Group and Get Associated Value For Calculation

I have a data set with car values (example data) where I want to calculate "Residual Pct" from the user's selected date go forward.  This all starts with a drop down slicer for the user to select the starting "Qtr Date".  Based on this selection, I need to capture the "Value" associated with that date.  THEN, using that captured "Value" we calculate a "Residual Pct" for each quarter after and including the user's selected start date.  This is done at the Make/Model level as well so it resets the initial value at the Make/Model level.  

 

In the example, the data is by quarter by Make/Model for 2 years.  The user in the slicer drop down selects "4/1/2023".  Given this selection, I need to capture "$19,000" for the Toyotal Camry and "40,000" for the Nissan Maxima.  Finally, the "Residual Pct" is calculated for EACH quarter respective to each Make/Model but only starting with what the user selected as the "Qtr Date" in the slicer.

 

Below is an example.  I've tried numerous ways with examples but still can't resolve.  Appreciate any help.Power BI Forum Example - Min Date over group with Associated Value.JPG

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Pfin
Frequent Visitor

Below is sample data.  Expected results are in the yellow column, Residual Pcts.  For some reason with the data below I get an error message about HTML issue and it is pasting that in a weird format that doesn't look to be copy/paste well.

 

MakeModelQtr DateValue
ToyotaCamry1/1/202320000
ToyotaCamry4/1/202319000
ToyotaCamry7/1/202319500
ToyotaCamry10/1/202318000
ToyotaCamry1/1/202417000
ToyotaCamry4/1/202417000
ToyotaCamry7/1/202416500
ToyotaCamry10/1/202417500
NissanMaxima1/1/202340000
NissanMaxima4/1/202340000
NissanMaxima7/1/202338000
NissanMaxima10/1/202336000
NissanMaxima1/1/202437000
NissanMaxima4/1/202438000
NissanMaxima7/1/202434000
NissanMaxima10/1/202434000

lbendlin_0-1729877268980.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.