Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
oseimuduame
Creator II
Creator II

Average Sales by Days

Good Morning Guys,

I am having issue with a report on Qlikview, i want to be able to run an average sales report by day. This means that if i made a sales of 100000 in a month that the invoice days is 28, i want to be able to get the average sales.

Avg = Total Sales / No of Invoice Days

Note: i am suppose to use Avg = Total Sales / No of Days but there are days when no sales was made.


I used AVG(INVC_PRICE) but not getting the correct result.


Any help please

18 Replies
sunny_talwar

Can you try with Count(Distinct....)

Count(DISTINCT {<Date = {"=Sum(Sales) > 0"}>}Date)

sunny_talwar

So, this...

Sum(Sales)/Count(DISTINCT {<Date = {"=Sum(Sales) > 0"}>}Date)

oseimuduame
Creator II
Creator II
Author

I now used

Count(DISTINCT {<INVC_DAY = {"=Sum(INVC_EXT_PRICE) > 0"}>}INVC_DAY)

and it was close. Now i am getting 14 as my number of days

sunny_talwar

How about if you do this

Count(DISTINCT INVC_DAY)

sunny_talwar

Or this

Count(DISTINCT {<INVC_DAY = {"=Sum(INVC_EXT_PRICE) <> 0"}>}INVC_DAY)

oseimuduame
Creator II
Creator II
Author

Dear Sunny,

The above script works very well now checking and comparing with the other stores.

See image below. Thanks So much

avg2.PNG

oseimuduame
Creator II
Creator II
Author

This works very fine. Just the way i wanted

See Below

avg2.PNG

Exactly what i needed

sunny_talwar

Super

bbmmouha
Creator
Creator

share the solution plz and close it as solved