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: 
poojashribanger
Creator II
Creator II

Revenue Adjustment Month-on-Month

Hi All,

I have a table with Multiple entries for date.

Example:

poojashribanger_0-1730779491712.png

 

Output for Jan will be 700-100=600

Feb will be 150-200=-50

Now i want to deduct Value from table 2 from the overall value of Jan from table 1  in data load editor but without aggregating.

Is it possible as i already have a data model in place with almost 15 different tables and i can't aggregate the data at the backend.

Thanks in |Advance

Regards,

Poojashri

 

Labels (2)
3 Replies
Qrishna
Master
Master

So you wanna do it in load editor or on UI? if you wanna do it backend without disturbing the existing Data model, try creating a new resident load table and work on it, On UI its doable but seems a bit complex compared to the backed logic when the Full datamodel is unknown. But from the picture you have provided, we could achive it using Rangesum(Above()). 

 

for you understanding i have split the expression:

 

Measure1 = Sum(Sales)
Measure2 = Sum({$<Product={'Eraser'}>}Sales)
Measure3 = RangeSum(Above(Measure2,0,RowNo()))
Measure_Final = Measure1-Measure3

combined expression:
Sum(Sales) - RangeSum(Above(Sum({$<Product={'Eraser'}>}Sales),0,RowNo()))

 

2490696 - Revenue Adjustment Month-on-Month (1).PNG

 

marcus_sommer

It's quite simple within the data-model by concatenating both tables, for example:

t: load Date, Product, Sales as Value, 'Sales' as Source
from A;
concatenate(t)
   load Adjustment as Date, 'Adjustment' as Product, -Value as Value, 'Adjustment' as Source
from B;

Kushal_Chawda

@poojashribanger  if both your tables are linked on date you can simply write below expression

 

sum(sales) - sum(adjustedvalue)