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: 
ravindraqv9
Partner - Contributor II
Partner - Contributor II

FieldValue and FieldValueCount not working with Preceding load

Hi All,

Hope everyone is doing good.

I have an issue with FieldValue()  and FieldValueCount() functions when used in Preceding load as given below.

Load Min(FieldValue('Sales',RecNo())) as MinSales,

         Max(FieldValue('Sales',RecNo())) as MaxSales

AutoGenarate FieldValueCount('Sales')

Load * Inline

[

ID,Sales

1,100

2,200

3,300

4,400

];

When i used the above script i am getting null value in both fields.

Kindly let me know if anyone having idea why it is giving null values.

Thanks in advance,

Ravi

14 Replies
ravindraqv9
Partner - Contributor II
Partner - Contributor II
Author

Yes Sunny. The code which you have sent is working. but what i am really wondering is the script which i have mentioned in my original post worked for me before and not working now.

sunny_talwar

Well rwunderlich‌ might have an idea of how did this ever work

Load Min(FieldValue('Sales',RecNo())) as MinSales,

         Max(FieldValue('Sales',RecNo())) as MaxSales

AutoGenarate FieldValueCount('Sales');

Load * Inline

[

ID,Sales

1,100

2,200

3,300

4,400

];

Unless you have another reference of Sales field before the AutoGenerate table..... If you never had a reference of Sales before AutoGenerate.... I believe that this should have never worked....

ravindraqv9
Partner - Contributor II
Partner - Contributor II
Author

Hi Sunny,

I might be wrong. Thanks for all your inputs.

Regards,

Ravi

sunny_talwar

No problem my friend... but you might be wrong about what? That it worked in the past?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I can't imagine this "working" -- as written. Perhaps some variation did, or an earlier QV version did not throw an error but did not return a correct result either.

-Rob