[unsolved] how to write the formula

Edited by Nikolai Strakho at 2024-5-2 22:04

Hello!
I have a table containing invoice lines (invoice_date, product_id, purch_price, quantity)
I have added formula column line_sum = SUM_AGG(${PurchLineSum})/ SUM_AGG(${Количество})
I have added calculation indicator PurchPrice_WA = SUM_AGG(${PurchLineSum})/ SUM_AGG(${Количество})
After that I want to filter top 5 products with the most increase of PurchPrice_WA.

I think, I should make a calculation indicator to compare first and last PurchPrice_WA value in chosen period.
How can I do this?
I have tried this:
IF (${invoice_date}= DEF(MAX_AGG(${invoice_date}), [YEAR(${invoice_date}), MONTH(${invoice_date})]), ${PurchPrice_WA}, 0)
But I've got an error: "IF: Cannot mix aggregated and non-aggregated parameters"


I know the answer Seeking the best answerBest Answer worth10 money ,0 people have answered
Reply

Use magic Report

You have to log in before you can reply Login | Register


following

fans

Posts

Post