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