Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Calculate the number of days in which sales were

Who can help me

7 Replies
Employee
Employee

Re: Calculate the number of days in which sales were

Hi - i found this question in your QVW

"Hi all!. Need help. How i can count date in month there was sales.  Thanks"

I used this expression to count the dates (days) where Sales > 0

count( distinct  if( Sales > 0 , Fact_data))

You don't have a lot of data to test... the last column in the screenshot is the same formula as above.  Hopefully it works for you ?

Capture.PNG.png

Not applicable

Re: Calculate the number of days in which sales were

OK. Good. But i have question. How am can use set in this formula.

I need take in this formula sum(<{Family = {"Иванов"}>}SALES), but this is empty value

What do you mind above this formula

=Sum(Aggr(If(sum({<Family={"Иванов"}>}Sales) , 1, 0), Fact_data))

But this formula don't return all information for all family

Employee
Employee

Re: Calculate the number of days in which sales were

HI - was is the business question you are trying to answer with your latest post ? 

-Do you still want to count the number of dates in a month that there were sales?

-Or do you want to count the # sales there were for each family ?

-Or do you want to combine the 2 and answer the # of sales there were in each month for just 1 family ?

When you use SET ANALYSIS with a family hard coded, it will only calculate the results for the family ...not for others.

Not applicable

Re: Calculate the number of days in which sales were

I have situation when i show column with data on days and see what is count = who, but when a make aggregation for a month a see that 3. How it s impossible.

Answer Yes -Or do you want to count the # sales there were for each family ?

Employee
Employee

Re: Re: Calculate the number of days in which sales were

I did not get  a clear idea of the  table that you need and did not understand your response. My suggestion is to create a table in excel that illustrates what the table SHOULD look like. 

However, If you want to see the # of days that had sales by family here are a few options:

Capture.PNG.png !

Not applicable

Re: Calculate the number of days in which sales were

This formula on my date set is incorrect. I see cell where null value, but this day is calculated.

That do you thing above formula Count(aggr(NODISTINCT IF($(=Sales)>0,$(=Sales)),Fact_data))

They also incorrect.

Employee
Employee

Re: Calculate the number of days in which sales were

Hi - i am actually not clear on your requirement.  If you can upload your QVW as well as a picture of what you need the result to look like that would help very much.