Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I get a pivot table to display a non-zero minimum value?

Hi,

I have a data table with the purchasing data for a set of parts for 2010, 2011 & 2012. This data comprises, in some cases, of more than one purchasing price for an item in a given year. Eg.: A pen may have been purchased in 2010 at $ 10.00, and the same pen at a later part of the year at $ 15, and  $ 18. However, there is also a zero value transaction, where the vendor has given me this pen for $0.00 in order to regularize some older transaction.

In the example above, I would like the pivot table to display the minimum purchasing cost in 2010 to be $ 10.00 and not $0.00. What is the expression I should build around this..?

My data headers are as follows:

Part #Unit Actual PriceYear
XXXX1$ 10.002010
XXXX1$ 12.002010
XXXX2$ 7.002010
XXXX2$ 8.002010
XXXX1$ 15.002010

I need to be able to display the minimum non-zero price for each year..

Any form of help would be appreciated!

Thanks in advance

RL

14 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Create a chart with dimensions as Part No and Year

     And expression as Min({<Price = {">0"}>}Price)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Kaushik.. Please read my earlier post to Jagan.. I need the price by each year in columns.. and not in rows (which is what would happen if I listed YEAR as a dimension..)..

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Sorry forgot to tell you that create a Pivot table and then drag the Year Column on top of the Expression.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jagan
Partner - Champion III
Partner - Champion III

Hi,

I just used the same expression which kaushik given in earlier post and used the following script

LOAD

* INLINE [

Part #,    Unit Actual Price,    Year

XXXX1,    10,    2010

XXXX1,    12,    2010

XXXX2,    7,    2010

XXXX2,    8,    2010

XXXX1,    18,    2011

XXXX1,    10,    2011

XXXX1,    12,    2011

XXXX2,    7,    2012

XXXX2,    8,    2012

XXXX1,    18,    2012 ];

Created a Pivot chart with Part# and Year as dimensions, PFA screenshot of the same.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Works fine now.. Thanks so much for your time Jagan & Kaushik..!!