Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Problem using Expression in Pivot Chart

Hello All, Can someone please help me with an expression in a pivot chart.

I am trying to create a pivot chart which shows per part number per Year/Month the following items:

- Stock(Qty) mutation (column: voorraad mutatie),

- Stock(Qty) level (column: voorraadstand),

- Latest Stock Price (column: VVP).

I have enclosed an example of my dashboard with this message.

The Stock Price is where i am having some problems because this price does not change every month.

This is the tabel of the stockprice changes:

DatePartcodeNewPrice
15-12-201322225
1-2-201422220
5-3-201422210
10-3-20142225
10-4-201422220
11-5-201422215
15-5-20142221

Stock(Qty) mutations:

DatePartcodeMutation
28-11-2013222315
15-1-20142225
15-2-201422210
28-3-2014222-20
15-5-2014222-5
20-6-201422210

I am using  the following expression:

=FirstSortedValue(NEWPRICE_MUT, -STOCKPRICEDATE_Mut)

As you can see in the Pivot where there is a stock(qty) mutattion but there is no NewPricebut it will not find the NewPrice.

I hope someone can tell me where i am going wrong.

2 Replies
Not applicable
Author

Hello,

i can see, that you have StockNrYearMonth_Mut as dimension.

Your expression for VVP is evaluated in context of this dimension. So, firstsortedvalue in each cell is calculated only from rows, which are present for particular value of this StockNrYearMonth_Mut.

In my oppinion the easiest way to have price for each date is dividing VOORRAAD_Mut into few tables during reload and then associate price with all months, where this price is valid.

regards

Darek

Anonymous
Not applicable
Author

Hello Darek,

Thank you for your reply.

Unfortunately this is not exactly what i am looking for.

I will keep trying to solve this in the expressions.

Regards,

Yuri.