Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Priceinfluence

Hello everybody,

I have the following problem:

I would like to calculate the sales (sales volume * price). The price should come from a historical article table, however, and I need the price at which the day is the minimum.

This is linked to the question whether one would have earned more or less if the prices had remained as it were at the beginning. I have created the following expression.


KBETR = Price

ABSMG = amount

SUM(AGGR(SUM(ABSMG) * SUM({<TAG_ID={"$(=MIN(TAG_ID))"}>}KBETR/1.19),MATNR))


In an article that works wonderfully. If, however, I select several articles, the AGGR function takes the minimum tag of all articles. It can be, however, that with certain articles on this day no price is registered. The minimum day should be calculated for each item.


could someone help me here?

2 Replies
sunny_talwar

May be this

Sum(Aggr(Sum(ABSMG) * Sum(Aggr(If(TAG_ID = Max(TOTAL <MATNR> TAG_ID), KBETR/1.19), MATNR, TAG_ID)), MATNR))

Not applicable
Author

Thank you very much. It seems to be correct.