Hi,
I have to calculate the sales contribution of the customers.
Am using this expression
(sum({$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=, CustomerCode>} $(eSales))
- sum({$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=, CustomerCode>} $(eRent)))
/
(sum(TOTAL {$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=>} $(eSales))
-sum(TOTAL {$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=>} $(eRent)))
This is working but i need to show current date's sales contribution without any selection.
.
May be this
(Sum({$<DateKey = {"$(=Date(Today(),'YYYYMMDD'))"}, Year, Quarter, Month, WeekName, Date, CustomerCode>} $(eSales))
- Sum({$<DateKey = {"$(=Date(Today(),'YYYYMMDD'))"}, Year, Quarter, Month, WeekName, Date, CustomerCode>} $(eRent)))
/
(Sum(TOTAL {$<DateKey = {"$(=Date(Today(),'YYYYMMDD'))"}, Year, Quarter, Month, WeekName, Date>} $(eSales))
-Sum(TOTAL {$<DateKey = {"$(=Date(Today(),'YYYYMMDD'))"}, Year, Quarter, Month, WeekName, Date>} $(eRent)))
May be this
(Sum({$<DateKey = {"$(=Date(Today(),'YYYYMMDD'))"}, Year, Quarter, Month, WeekName, Date, CustomerCode>} $(eSales))
- Sum({$<DateKey = {"$(=Date(Today(),'YYYYMMDD'))"}, Year, Quarter, Month, WeekName, Date, CustomerCode>} $(eRent)))
/
(Sum(TOTAL {$<DateKey = {"$(=Date(Today(),'YYYYMMDD'))"}, Year, Quarter, Month, WeekName, Date>} $(eSales))
-Sum(TOTAL {$<DateKey = {"$(=Date(Today(),'YYYYMMDD'))"}, Year, Quarter, Month, WeekName, Date>} $(eRent)))
What is this field?vToDate
In expression, you can put today's date in filter
Thanks you..
How can I create an alert if the sales contribution is greater than 10%
Like an email alert or some in the dashboard itself?
An email
You might be able to use nPrinting... but there might be other ways, but I have not use those so would be difficult to comment about them
Ok..Is it possible to show in the dashboard itself like an alert after every reload
That should be possible... May be check this out
https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/AlertsDialog.htm
Ok..But how can I use this expression as a condition while creating an alert.