Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
deborahs
Contributor III
Contributor III

Exporting a report with calculated fields.

Hello!

I'm trying to export a Qlikview file table in through NPrinting. In my app, I have a Market Value field in USD and I have a list box with currencies so that when you select a particular currency, the market value changes and we are using an exchange rate for the calculation. The calculation is taking place in the app (the field itself is calculated from the market value field).

BUT, in my report,  cannot see values for Market Value converted.. 

Any tips how to go about this?

7 Replies
benvatvandata
Partner - Creator II
Partner - Creator II

What is the exact formula you are using? And just for clarification, the values works fine in Qlikview, but after being exported you don't see them any more?

 

deborahs
Contributor III
Contributor III
Author

I have a column with name 'Market Value(USD)' and MarketValue as Market Value(___). The field of Market Value(___) is calculated with 'Market Value(USD)' and an exchange rate. The selection of the currency is in a list box and im using if substring() function. 

I generated an Nprinting excel report of this app so that I could get these values (USD and converted) but in the excel, only USD values were preset, the converted field was full of 0.

 

Ive attached an image of the sheet.

The field name is also dynamic depending on the choice of currency in list box but in the excel sheet, the fields name is Market value () that means the parameter is not being passed.

 

deborahs
Contributor III
Contributor III
Author

I have a column with name 'Market Value(USD)' and MarketValue as Market Value(___). The field of Market Value(___) is calculated with 'Market Value(USD)' and an exchange rate. The selection of the currency is in a list box and im using if substring() function. 

I generated an Nprinting excel report of this app so that I could get these values (USD and converted) but in the excel, only USD values were preset, the converted field was full of 0.

 

Ive attached an image of the sheet.

The field name is also dynamic depending on the choice of currency in list box but in the excel sheet, the fields name is Market value () that means the parameter is not being passed.

 

benvatvandata
Partner - Creator II
Partner - Creator II

Could you elaborate on your 'if substring()' formula? And that is the formula you're using in your expression correct? I definitely remember doing something similar to this for clients, but it's hard for me to troubleshoot without knowing a little more detail. 

deborahs
Contributor III
Contributor III
Author

Substring() is the conditional formula I'm using for associating the market value with the currency the user selects.

 =SubStringCount(Concat(_value, '|'), 'MarketValueconverted').

The calculation that takes place is 

=Sum( Aggr( Sum( { < Date={'<=$(vAsOfDate)'} , Flag = {'$(..)'} > } Shares) * If(Count( {< StartDate={'<=$(Date)'} , Endate={'>=$(Date)'} > } DISTINCT %..) > 0, .., 1 ) , ClientID, AccountID, AssetID) )

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

see how you are saying here: substring() is the conditional formula I'm using for associating the market value with the currency the user selects.  

How is your NPrinting report doing this selection ? Did you set it up as a filter? 

When NPrinting opens up document it clears all selection effectively changing removing any selection from the field which should be selected. You may need to create a Filter in NPrinitng to select a currentcy you want to see report in.

If your current application has "always one selected value" on this field please note , that this is not supported configuration with NPrinting as stated on official help page: https://help.qlik.com/en-US/nprinting/April2019/Content/NPrinting/GettingStarted/HowCreateConnection...

cheers

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
deborahs
Contributor III
Contributor III
Author

Thank you sir, this makes sense. I tried testing a new app with calculated values and it worked. It must be the selection filter affecting this and as you mentioned since NPrinting does not consider selections, the value returned is null!