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

bar chart expression calculation

Hi,

I need to create the following:

Capture.PNG

the red and blue are actually orders in Atlanta/Chicago which are belong to the current year only and having specific status.

how can I calculate orders within the current year only which will work in the expression?

I tries this:

count(if( project_status='Completed' and  Year=year(today()),order_ID))/count(if(Year=year(today()),order_ID))

but I think it will not work to write like thus in bar Chart.

please help.

thanks,

Anat

4 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

there shouldn't be any problem using this expression in bar chart

alternatively you can use set analysis for the year part

count({< Year={"$(=year(today()))"}>}

if( project_status='Completed',order_ID))/count({< Year={"$(=year(today()))"}>}order_ID))

Anil_Babu_Samineni

You can right like below?

count(if( project_status='Completed' and  Year=year(TOTAL today()),order_ID))/

count(if(Year=year(TOTAL today()),order_ID))

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
its_anandrjs

This expression seems correct for me,

count(if( project_status='Completed' and  Year=year(today()),order_ID))/count(if(Year=year(today()),order_ID))


What error you get an result?

its_anandrjs

Why not in SET expression as well

count({< Year={"$(=year(today()))"},project_status ={'Completed'}>} ,order_ID)

/

count({< Year={"$(=year(today()))"}>} order_ID)