Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
snarrp_Rocky
Contributor III
Contributor III

Need Help with Expression. Urgent.

Dear All,

I am stuck with one important project with this result, would be grateful is someone kindly help me get this results please. I need to submit the pack within 5 days.

I have attached excel (Data and Result) file with data and outcome or result with formula how I would like to be seen in qlik view.

Could you please help with sample QVW file.

Kind Regards,
Nitin

1 Solution

Accepted Solutions
sunny_talwar

We have already tried to resolved multiple issues here, would you be able to create a new thread for this additional requirement?

Thanks,
Sunny

View solution in original post

18 Replies
sunny_talwar

Try this

=Min(Aggr(Sum(PnL), ScenarioDateID), 5)
albert_guito
Creator II
Creator II

If you want to see the 5th lower results in you pivot table you can also use the dimension

=AGGR(IF(Rank(sum(PnL), 4)<=5, varRank), varRank)
Ag+
snarrp_Rocky
Contributor III
Contributor III
Author

This is Great. Thanks Sunny so much. I have one constraint here. If I add another desk, it is not giving me the result.

 

I have attached what I am referring to. Your further help would be great help.

Kind Regards

Nitin

snarrp_Rocky
Contributor III
Contributor III
Author

Thanks Albert But this expression is not giving me the result. I have some expression written. Got help from Sunny. Just need to get some further help.

I have attached my QVW and I have mentioned in the test box what I am looking for please.

Kind Regards

Nitin

sunny_talwar

Try this

=Min(Aggr(Sum(PnL), ScenarioDateID, NodeName5), 5)
snarrp_Rocky
Contributor III
Contributor III
Author

thank you Sunny. that was really helpful.

Would you mind helping with how do I get the scenario date of the 5th min which we calculated. I need to get this populated in right next column of this calculated number.

Many thanks for your kind help!

Regards

Nitin

sunny_talwar

Try this

=FirstSortedValue(ScenarioDateID, -Aggr(Sum(PnL), ScenarioDateID, NodeName5), 5)

image.png

snarrp_Rocky
Contributor III
Contributor III
Author

Thanks Sunny. But the date for Credit & DCM should be 16th Mar 2017, and IRO & CPI = 4th Sep 2017
sunny_talwar

My bad, try this

=Aggr(If(Sum(PnL) = Min(TOTAL <NodeName5> Aggr(Sum(PnL), ScenarioDateID, NodeName5), 5), ScenarioDateID), ScenarioDateID, NodeName5)

image.png