Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone!
I'm facing i problem in my qlikview app.
I created a field that, for each month, stores the quantity in stock for each product, based on another field that stores the variation.
What I want to do know is to create a table showing only the last value (december) for each year, but seems that QV always makes the sum of every month.
Thanks in advance.
Also one more thing to notice about Firstsortedvalue is that it should return only one unique value. For example if Dec of 2012 has two quantities like 20 and 30 it will be null. In that case you can create a flag in the backend and use Set analysis in sum.
Please check out the attached doc.
Hi Andre,
You can use Firstsortedvalue(). It is a very powerful function and it might solve your problem.
If you still have issues please attach your sample doc.
Thanks
AJ
Thanks for your reply Ajay. I already tried that function.
Basically want I want to accomplish in the table is, p.e. for 2012, show only the stock quantity for december, which the correct valu, not the sum of every month.
Would it be possible to attache a sample qvw with some dummy data just to get an idea of all the fields in the table.
Here it is...QV is calculating the sum for all months but I only want for the max of the month, for each year.
Done.
Also one more thing to notice about Firstsortedvalue is that it should return only one unique value. For example if Dec of 2012 has two quantities like 20 and 30 it will be null. In that case you can create a flag in the backend and use Set analysis in sum.
Please check out the attached doc.
I'm very thankful for your help AJ, I had already tried that, works the way I want in the dummy data but its not working corretly in my real project, I'm afraid I can't recriate all the variables, it's quite a big app.
Thanks anyway.
With some tweeks the flag seems to work fine...but there's a problem, which is the current year, the table should display the quantity for january but january is not the max month for 2014, am I missing something?
Can you rephrase that.
It should display quantity for Jan of 2014 as thats the max month. Once we get into Feb then it will ignore Jan and show for Feb.
So the way it works is if a Year has data for months 1,2,3,4,5,6,7,8 then the max month would be 8 (August) and it will show quantity for August. It would change dynamically based on the max month for each year. It wouldn't always be dec.