Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sales Vs budget

Hi all,

     I am doing sales application in that i have given condition that item which is sold out (ie) Type= sale, so it will display only sold item. But when i compare this sale quantity with budget quantity for some other reason their is no entry for few budget item fell into value entry  table. And here my issues is in need to bring item from budget table which is not value entry (type not = sales). Kindly Help

ValueEntryNewOne:

Load    

    *,

        D_REGION&'-'&ItemNo&'-'&VPeriod as vvvv,

         D_REGION&'-'&ItemNo&'-'&VPeriod  as BudKey

       

From ValueEntry;

Budget:

Load

Region&'-'&ItemCode&'-'&Period as BudKey

From Budget;sales

15 Replies
Anonymous
Not applicable
Author

Hi Sasi,

if i understood correctly u can use keep right to link both tables..

when calculating of budgetQuantity and salesquantity u can use

sum(ibudgetquantity)

sum(if(type=sales,budgetquantity))

Anonymous
Not applicable
Author

Correction:

***sum(if(type=sales,salesquantity))

its_anandrjs

If your concatenate definitely  you got ccc field and yes there is no need to add dummy field also but it will better if you add that dummy field

but after concatenation and you want to get sales value and budget value then with the help of flag you get that like

=Sum({< Flag={TableFlag = {'Sales'}} >} Amt)  //for sales amt

=Sum({< Flag={TableFlag = {'Budget'}} >} Amt) //for budget amt

Not applicable
Author

this is the budget item i have got 1442.62 and actuall i need to get 1450.00 y because one item value is missing

1442.62+8151=1450.62

arsal_90
Creator III
Creator III

Can you share your qvw not image. As it easy for us to do amendment on your qvw

preminqlik
Specialist II
Specialist II

Hi sasi kala,

if you are making key then you need to make key after concatenating c below for the code:

ValueEntryNewOne:

Load   

Region,

ItemCode,

Period,

Amount,

'Sales'             as               Type 

From ValueEntry;

concatenate

Load

Region,

ItemCode,

Period,

Amount,

'Budget'             as               Type           

From Budget;

drop table ValueEntry;

drop table Budget;

FINAL:

Load *,

Region&'-'&ItemCode                     as      %Item_Master_Key,

Region&'-'&ItemCode&'-'&Period      as      %BudKey

resident ValueEntryNewOne;

drop table ValueEntryNewOne;

-----> now in front end

Actual :

sum({<Type={'Sales'}>}Amount)

Budget

sum({<Type={'Budget'}>Amount}