Hi,
Hoping someone can help.
I have a report where I trying to pull back a text value for the latest invoice date.
I am trying to summarise some billing data by the following columns:
Product, Core Value (which is Core, Non-Core or Unassigned), Value £
The Core Value could be one of the 3 values listed above, but I would like to summarise the data based on the value that was on the very latest invoices.
So for instance:
Raw Data
Product | Billing Date | Core Value | Value £
a1 | 01/01/2023 | Core | £2
a1 | 03/01/2023 | Non-Core | £2
a1 | 05/01/2023 | Non-Core | £2
a2 | 12/12/2022 | Non-Core | £10
a2 | 01/01/2023 | Non-Core | £10
a2 | 04/01/2023 | Core | £10
Summarised Data
Product | Core Value | Value £
a1 | Non-Core | £6
a2 | Core | £30
I have got the max invoice date using the following formula:
Max Invoice Date: = Max([Spend].[Billing doc. date] In ([Spend].[Material].[Material - Key];[Spend].[Billing doc. date])) In ([Spend].[Material].[Material - Key])
I then try & get the Core Value for the maximum invoice with the following formula. But this only shows correctly against the right date when I pull the billing doc date through (the value against the rest of the dates are blank), and then when I remove the Billing Doc Date I get #MULTIVALUE
Core Value per Max Date =[Spend].[Customer Core Mat] ForAll ([Spend].[Material].[Material - Key]) Where ([Max Invoice Date] = [Spend].[Billing doc. date])
Can anyone tell me where I am going wrong? Any help would be greatly received, as it’s been driving me crazy trying multiple different things.
Regards
Carly