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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sakshikaul
Creator II
Creator II

expression for calculating a sales on daily basis

Hi

In the following image i want to write an expression for the following:-

1. I want the user to select date from calender for eg 1st june till 18th june 2018 and the sales should be displayed in the following chart .If suppose user selects start date as 14-6-2018 so sales for that period should be displayed individually like 14-6 2018 should have budget and sales under column MRP daily target and MRP daily achievements respectively

what all changes should be done in following expression ?

=num(sum({<BugetDate = {">=$(From)<=$(To)"} >} [inv value]/Sales_INR_Unit),'#,##0.0')Paint1.png

7 Replies
sakshikaul
Creator II
Creator II
Author

kakani87
Specialist
Specialist

In the above expression shared by you considered the dates range Fromdate and Todate fields so if you remove the set expression as budget date = {<BugetDate = {">=$(From)<=$(To)"} >} from yours

Like this =num(sum( [inv value]/Sales_INR_Unit),'#,##0.0')

Try with out considering set expression

balabhaskarqlik

May be like this:

num(Sum(aggr(sum([inv value]),BugetDate,Sales_INR_Unit)),'#,##0.0')

num(Avg(aggr(sum([inv value]),BugetDate,Sales_INR_Unit)),'#,##0.0')

sakshikaul
Creator II
Creator II
Author

Here I am getting same values for the date selected by user in the calendar (check values under heading MRP daily achievements )Paint1.png

sakshikaul
Creator II
Creator II
Author

here i am getting value as 0Paint1.png

sakshikaul
Creator II
Creator II
Author

HERE IS THE DATA MODEL

Paint1.png

sakshikaul
Creator II
Creator II
Author