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: 
grajmca_sgp123
Creator
Creator

How to use RangeMax function with in AGGR Expression

Hi All, I am working on Qlikview migration project. I have to use same dim/expressions in QlikSense table.

I have one AGGR expression in QV : 

Sum(Nummax(aggr(Sum(FAIR_VALUE_Ori), L1_OFB, NETTING_AGREEMENT_REFERENCE), 0))

When I use same expression in QS, the values are not matching with QV data.

Same expression giving two different outputs in QV and QS. But I want same QV output in QS also. Kindly check the attachment and suggest the solution.

grajesh_sgp_0-1694084400177.png

Note :  I tried RangeMax also but it is giving same result of NumMax only.

 

Labels (1)
1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

In this case, look for other possible issues. It's possible that older versions of QlikView processed NULL values differently, or perhaps your data structure could be slightly different between the two environments.

For example, I noticed that you are using AGGR() with dimensions that might not be more detailed than the chart dimensions - that's a problem by itself, and it's possible that this problem manifests itself differently in QlikView and in Qlik Sense. 

In Qlik Sense, you are getting a sum of the last two lines in a single number, while in QlikView, these totals are separated. It tells me that perhaps in QlikView your data is arranged in such a way, that the AGGR dimensions might be more detailed than the chart dimensions, while in Qlik Sense they are not. You should look for differences in this direction.

cheers,

View solution in original post

6 Replies
henrikalmen
Specialist
Specialist

Maybe try this: Sum(rangemax(max(aggr(Sum(FAIR_VALUE_Ori), L1_OFB, NETTING_AGREEMENT_REFERENCE)), 0))

Nummax is deprecated even in QlikView and RangeMax is recommended instead, but apart from that I enclosed the aggr function in max(). I'm not sure this is the solution to your issue but you could try.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

Conceptually, QlikView and Qlik Sense should return the same result, at least if they are running comparable versions - because both products are using the same engine under the hood. However, if QlikView version is very old, and Qlik Sense version is current, there might be some subtle differences.

In your formula, the function Nummax() raises questions in my head. I think it was deprecated long time ago. Try replacing Nummax with the current version of the same function - Rangemax(), and see if you get the same results.

To learn more advanced development techniques, check out the agenda of the Masters Summit for Qlik - coming soon to Orlando and to Dublin!

  

grajmca_sgp123
Creator
Creator
Author

Thank you for suggestion , I tried RangeMax also but it is giving same result of NumMax only.

henrikalmen
Specialist
Specialist

Did you also try wrapping the aggr function in max() as I suggested?

Just like Oleg_Troyansky said, QS and QV should give the same result at least if versions are recent. As the next troubleshooting step I would probably check the underlying data to make absolutely sure that I have got the same data in QS as in QV.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

In this case, look for other possible issues. It's possible that older versions of QlikView processed NULL values differently, or perhaps your data structure could be slightly different between the two environments.

For example, I noticed that you are using AGGR() with dimensions that might not be more detailed than the chart dimensions - that's a problem by itself, and it's possible that this problem manifests itself differently in QlikView and in Qlik Sense. 

In Qlik Sense, you are getting a sum of the last two lines in a single number, while in QlikView, these totals are separated. It tells me that perhaps in QlikView your data is arranged in such a way, that the AGGR dimensions might be more detailed than the chart dimensions, while in Qlik Sense they are not. You should look for differences in this direction.

cheers,

grajmca_sgp123
Creator
Creator
Author

thank you for suggestion, tried this also but issue not resolved.