Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
khan_imran
Creator II
Creator II

Earned value calculation dinamically

Hi All,

I want to calculate my earned amount using below logic.

(sum(AMOUNT)*Active Days)/Tenure

sum of amount = It is calculated using direct field available in Data

Active Days = (Date selected in the frond end - Reporting_Date)+1

Tenure = (End_Date - Reporting_Date)+1


Below is an example of my calculation:

 

NOREPORTING_DATEEND_DATEAmountTenureActive Days
2020/04/201619/04/2017175.00365195


I want to get my Active days calculated from the back end and get update as per the change in selection like from and to.

In above mentioned example my selection is From 01/04/2016 to 30/09/2016 and therefore the active days shown as 195. If i change my to date either of the the side then my active date must change on my selection.

I want to have these calculated happen at back end.

Attach is the sample file for your reference.

Regards,

Imran K

3 Replies
Gysbert_Wassenaar

Perhaps I'm misunderstanding you, but the load script has no access to user selections. First a document is reloaded and only then can a user make selections from the loaded data. You can't calculate measures in the back-end and expect them to change based on user selections in the front-end.


talk is cheap, supply exceeds demand
khan_imran
Creator II
Creator II
Author

Thanks gysbert for your response. Yes, We will give a date range to user for selection. Is it possible to calculate dynamic active days coming from backend?

Regards,

Imran Khan

Gysbert_Wassenaar

I don't understand your question. What should be calculated where? Consider that the back end has no interaction with the front end at all during the execution of the script. There are two distinct separate phases. The first phase is loading the data. The user cannot interact with that (a simplification, but consider it as true for now). The second phase is interacting with the loaded data using charts, listboxes etc. In this phase it is not possible to change the data in the data model (again a simplification, but for practical purposes as good as true).


talk is cheap, supply exceeds demand