Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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.

5 Replies
sunny_talwar

how do i count month without consider the dimension ?

Try this:

=Count(DISTINCT TOTAL yearmonth)

sunny_talwar

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

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