Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

mayuridg
Contributor

Max Price Vs. Least Price in Year

Please find attach sample data with in sheet 2 required output

1 Solution

Accepted Solutions
MVP
MVP

Re: Max Price Vs. Least Price in Year

Try:

Max Purchase Date Price: FirstSortedValue({<Year={'$(=Max(Year))'}>} [Unit Price], -Date)

Min Price: Min({<Year={'$(=Max(Year))'}>} [Unit Price])

10 Replies
mayuridg
Contributor

Re: Max Price Vs. Least Price in Year

Its Current Most Max Purchase  - Price & Minimum Price purchased in same org for same item in selected Year

MVP
MVP

Re: Max Price Vs. Least Price in Year

And your question is?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
mayuridg
Contributor

Re: Max Price Vs. Least Price in Year

Minimum Purchase Price againt that Item & Org .. check SHeet 2 in excel.. with Expected Output

MVP
MVP

Re: Max Price Vs. Least Price in Year

Straight table:

Dim1: Org

Dim2: Item

Exp1: Max({<Year={'$(=Max(Year))'}>} [Unit Price])

Exp2: Min({<Year={'$(=Max(Year))'}>} [Unit Price])

prma7799
Honored Contributor III

Re: Max Price Vs. Least Price in Year

Hi Mayuring,

As tresesco‌ said

PFA

Thanks

mayuridg
Contributor

Re: Max Price Vs. Least Price in Year

The logic should be Current means Max Purchase Date -  againt that Price ..& Min Price Means in selected Year for Same Item & Org Minimum Purchase Price.

if A item Purchase in Jan at rs. 350, in Feb at Rs. 300 & in Mar at rs. 200 than output will be below

A - Current Purchase Price will be 200, & Minimum Price will be 200.

Digvijay_Singh
Honored Contributor III

Re: Max Price Vs. Least Price in Year

F23 Org is missing in your expected output? Not sure why!

Digvijay_Singh
Honored Contributor III

Re: Max Price Vs. Least Price in Year

Your date format is DD-MM-YYYY or MM-DD-YYYY?

mayuridg
Contributor

Re: Max Price Vs. Least Price in Year

F23 is missing bcz output year is 2016 & date format is DD-MM-YYYY

Community Browser