Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculating the number of periods

Hello,

i want to calculate the number of periods of sales for each product.

For example, for the product "ADVANCE" we have 5 periods available, how can i calculate this number?

I used the function count but i think that i used incorrectly. Can i help me please? I really need it.

Thank you,

best regards,

Alâa Eddine.

aa.PNG

10 Replies
YoussefBelloum
Champion
Champion

Hi,

it depends on the structure of your table, what defines the availability for a product ? is it the YearMonth fields ?

try this:

=Count(Distinct YearMonth)

Anonymous
Not applicable
Author

Hello,

thank you for answering.

It is a pivot table and i tried but the result is not what i want.


this is the figure:

qqqqqqqqqqqqqqqqqqq.PNG

It shows the same value 59. What i want to get is for example for AA wa have 6 periods i want to get this number as the total number of periods for the product AA. The problemn is that QlikView calculate the total number of periods for all products together I think but i need it to calculate for each product separetely because the number of periods from a product to another.

Thank you.

prieper
Master II
Master II

You need to add the subfields in "<>", e.g.

Count(Distinct <SalesAggregatedBrand> YearMonth)

neelamsaroha157
Specialist II
Specialist II

Try using Count(Distinct <FirstDimension, SecondDimension> [YearMonth]).

If it doesn't work, would you mind sharing some sample data.

Anil_Babu_Samineni

Try this?

Count(TOTAL <SalesAggregatesBrand_CD> [Year Month])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hello,

thank you for your answer.

How can i share with you please?

Sorry, i am beginner.

Best regards,

Alâa Eddine.

Anonymous
Not applicable
Author

Hello,

i tried but i have the same message as above.

Best regards,

Alâa Eddine.

sijojoseph22
Creator II
Creator II

Please could you try aggr function, if possible please share the qvw

neelamsaroha157
Specialist II
Specialist II

when you hit 'reply', use advanced editor, there you will find the option to attach the file.

Hope it helps.

Capture.PNG