Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I hope someone can help. I have table of invoice records. I want to create measurement that will calculate the total Shipping Amount for the most recent invoice. The below measurement works as expect however the calculation only applies if the most recent invoice date is included in the report filter. For example, my current results shows the following. How do I get the $1000 value to appear on both records?
Customer Invoice Date ShippingCharge_Current
XYZ 11/11/21 blank
11/12/21 $1000
ShippingCharge_Current =
Var LastInvoiceDate = CALCULATE(MAX('Invoice'[InvoiceDate]),ALLEXCEPT(‘Invoice’ )[Customer]),ALL(Calendar), ‘Invoice'[Shipping]<0
Var LastInvoiceNum= CALCULATE(Max('Invoice'[Invoice Number]),AllExcept('Invoice',[Customer]),ALL(Calendar),'Invoice'[InvoiceDate] =LastInvoice)
Return CALCULATE('Invoice'[Shipping_Measurement],ALL(Calendar),AllExcept('Invoice',[Customer]),FILTER('Invoice','Invoice'[InvoiceNumber]= LastInvoiceNum))
@Anonymous , Try like
calculate(lastnonblankvalue(Invoice[Invoice Date], sum(Invoice[Shipping_Measurement])), allexpect(Invoice, Invoice[Customer]))
The suggestion did not work. I need the current shipping charge to appear on all invoice records.
How do I incorporate this in my current code?
Can you provide more direction. I need a single value measurement. Not a table.
Thanks
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |