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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

count month

hi,

i want to make expression that calculte "Monthly percentage orders".

but when i write "=count(DISTINCT(yearmonth))" , i get only the peirod that have orders.

for exm.

aaa order in feb & april , whan i chose month jan-may ( 5 month) ,

i need to culculte 2/5= 40%.

how do i count month without consider the dimension ?

thanks'

yarin.

Labels (1)
5 Replies
sunny_talwar
MVP
MVP

how do i count month without consider the dimension ?

Try this:

=Count(DISTINCT TOTAL yearmonth)

sunny_talwar
MVP
MVP

And to calculate the percentage, try this:

=Count(DISTINCT yearmonth)/Count(DISTINCT TOTAL yearmonth)

Anonymous
Not applicable
Author

thanks'

but it's look the same.

distinct total does't work as i need.

sunny_talwar
MVP
MVP

Can you share the some sample data with expected output?

SreeniJD
Specialist
Specialist

Hi Yarin,

Set an Order flag =1 for order month and 0 for missed month, and use the below expression..

=Sum({<OrderFlag={1}>} 1) / (Sum({<OrderFlag={1}>} 1)+sum({<OrderFlag={0}>} 1))

There is always better ways to do this

HTH,

Sreeni