Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm fairly new to Qlikview and I need help with an expression. I have a table box where I have values for product, source and destination and costs associated... I need expression for a chart which will calculate the three cheapest costs separately and then another expression that would be give me the source for those 3 cheapest costs separately... If you could point me in the right direction or give me some help, I would greatly appreciate it.
This is what the table box essentially looks like....
Product | Source | Destination | Cost |
---|---|---|---|
Handbag | A | A1 | 10 |
Handbag2 | B | B1 | 20 |
Handbag3 | C | C1 | 30 |
Handbag4 | D | D1 | 40 |
Handbag5 | E | E1 | 50 |
For Min Cost
Min(Cost,1)
Min(Cost,2)
Min(Cost,3)
For Souce
=FirstSortedValue(Source,Cost,1)
=FirstSortedValue(Source,Cost,2)
=FirstSortedValue(Source,Cost,3)
If you found your answer, please close the thread by selecting correct/helpful answer, so that other users can use it..
Product | Source | Destination | Cost | Cost 2 | Total Cost |
---|---|---|---|---|---|
Handbag | A | A1 | 0 | 5 | 5 |
Handbag2 | B | B1 | 10 | 10 | 20 |
Handbag3 | C | C1 | 20 | 15 | 35 |
Handbag4 | D | D1 | 30 | 10 | 40 |
Handbag5 | E | E1 | 40 | 20 | 60 |
Right now, I'm using the above example where I'm using =FirstSortedValue(Source, [Total Cost],1)
Is there any way that if my data had 0 as one of the cost, not to include it as the cheapest source?
For example, the cheapest source would be B, C, and D.