Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
siegbert
Contributor III
Contributor III

Generating field out of different tables

Hi Community,

in order to build a balance sheet i need to built a new field to decide where the figures is been showed (income or expenses).

The way to solve this is a little bit complex. I have several tables which i joined together to one Fact Table (tbh it looks good).

 

Example: 

Customer = 4711

accountno.= 15000

year= 2020

value: 700.000

Because this accountno. appears in income AND expenses i need a flag to choose where it should show up.

The flag logic is: 

if(
if(starvalue_flag= 'H',startvalue*-1,startvalue)
+
(sum_value-sum_value)
>0,'Income','Expenses')

The startvalue is on a yearly level and "sum_value" on a periodic (mostly monthly) level.

So i guess i need that flag on a periodic level per customer and accountno.

Should i build a loop in script with that logic, that generates this new flag field?

How should it look like?

 

Thanks

Labels (2)
0 Replies
Community Browser