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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

Displaying due date with highest value

Hello,

 

I'm working on integrating a billing report with a few hundred thousand lines of data into Power BI. A lot of the invoices are billed in parts. For instance, a $1,000 invoice might be billed to the client as $900, $90, and $10, each with a different due date. I'm looking to have a card that displays the due date with the highest value. Obviously, we don't care as much about that $100 as we do about the $900.

 

Thanks

2 ACCEPTED SOLUTIONS
v-yuezhe-msft
Employee
Employee

@Anonymous,

I made a test using the following sample table.
1.PNG

Firstly, create a new column in the table using the DAX below.

MaxInvoice = CALCULATE(MAX(Table1[invoices]),ALLEXCEPT(Table1,Table1[Client]))
2.PNG

Secondly, create a new table using the following formula.

Table = SELECTCOLUMNS(FILTER(Table1,Table1[invoices]=Table1[MaxInvoice]),"Client",Table1[Client],"Date",Table1[Due Date],"Highest",Table1[MaxInvoice])
3.PNG

 

Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Hi Lydia,

 

Thanks so much! Got it to work perfectly.

 

Regards,

Seth

View solution in original post

4 REPLIES 4
v-yuezhe-msft
Employee
Employee

@Anonymous,

I made a test using the following sample table.
1.PNG

Firstly, create a new column in the table using the DAX below.

MaxInvoice = CALCULATE(MAX(Table1[invoices]),ALLEXCEPT(Table1,Table1[Client]))
2.PNG

Secondly, create a new table using the following formula.

Table = SELECTCOLUMNS(FILTER(Table1,Table1[invoices]=Table1[MaxInvoice]),"Client",Table1[Client],"Date",Table1[Due Date],"Highest",Table1[MaxInvoice])
3.PNG

 

Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Lydia,

 

Thanks so much! Got it to work perfectly.

 

Regards,

Seth

@Anonymous,

Glad to hear the issue is solved. Please accept my reply as answer, that way, other community members could easily find the answer when they get same issue.

Regards,

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi there,

 

So I think you'll want to use some form of the FIRSTNONBLANK function for this to display the "Top Date" based on value. There's a great post by Rob Collie on PowerPivotPro that talks about how to do this for products, you'd just substitute the product name field with date. The post can be found here. Hopefully this can help steer you in the right direction.

 

Reid Havens -Principal Consultant

PowerPivotPro

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.