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
ahmed-
New Member

how can i get the last invoices date for each custmer by reports or by Powe BI iam using BC?

how can i get the last invoices date for each custmer by reports or by Powe BI iam using BC?

2 ACCEPTED SOLUTIONS
ray_aramburo
Super User
Super User

Hi @ahmed-  you will need to create a measure with a similar structure like this (I don't knpw your data) : 

Last_Invoice_Date = CALCULATE(MAX(InvoicesDataTable[InvoiceDate]), ALLSELECTED(CustomersDataTable[Customer]))

If this is helpful mark it as solved so it can help for future references, otherwise, kindly provide more details of your data. 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





View solution in original post

v-hjannapu
Community Support
Community Support

Hi @ahmed-,

Thank you  for reaching out to the Microsoft fabric community forum.
Thank you @Ashish_Mathur@ray_aramburo for your response regarding issue.

By using this Dax you get the last invoices date for each customer.

Last_Invoice_Date = 
CALCULATE(
    MAX(InvoicesDataTable[InvoiceDate]),
    ALLEXCEPT(InvoicesDataTable, InvoicesDataTable[CustomerID])
)

 I tested it with my sample data, and it worked fine. Please find the attached Pbix for your reference.
If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, so others can benefit as well.

Best Regards,
Harshitha.

 

 

View solution in original post

6 REPLIES 6
v-hjannapu
Community Support
Community Support

Hi @ahmed-,

Thank you  for reaching out to the Microsoft fabric community forum.
Thank you @Ashish_Mathur@ray_aramburo for your response regarding issue.

By using this Dax you get the last invoices date for each customer.

Last_Invoice_Date = 
CALCULATE(
    MAX(InvoicesDataTable[InvoiceDate]),
    ALLEXCEPT(InvoicesDataTable, InvoicesDataTable[CustomerID])
)

 I tested it with my sample data, and it worked fine. Please find the attached Pbix for your reference.
If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, so others can benefit as well.

Best Regards,
Harshitha.

 

 

Hi @ahmed-,
Just wanted to check if you had the opportunity to review the suggestion provided?

If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.

Regards,
Harshitha.

Hi @ahmed- ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If any of the response has addressed your query, please Accept it as a solution so that other community members can find it easily.


Thank you.

Hi @ahmed- ,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.

Regards,
Harshitha.

Ashish_Mathur
Super User
Super User

Hi,

What is BC?  Using measures, you will have to use the LASTNONBLANK() function.  To receive more help, share some data to work with and show the expected result.  Share data in a format that can be pasted in an MS Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ray_aramburo
Super User
Super User

Hi @ahmed-  you will need to create a measure with a similar structure like this (I don't knpw your data) : 

Last_Invoice_Date = CALCULATE(MAX(InvoicesDataTable[InvoiceDate]), ALLSELECTED(CustomersDataTable[Customer]))

If this is helpful mark it as solved so it can help for future references, otherwise, kindly provide more details of your data. 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





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.