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

show 0 on chart qlik sense

Hi

using a weeks as a dimension  weekend(OrderDate)

trend line chart

MissedOrder column in the load is 1 or null

i have in the set analysis measure as follows count( distinct {$<MissedOrder = {'1'}>} OrderID)

this shows how missed orders have been processed every week...

however i want to show the sometimes weeks that have no missed orders as 0 on the trend line 

how do i do this please

please help

1 Solution

Accepted Solutions
joeybird
Creator III
Creator III
Author


Hi

got it working

if (count(distinct{<MissedOrder = {"1"}>}[OrderID])  =0 , '0', count(distinct{<MissedOrder = {"1"}>}[OrderID])) +

if (count(distinct{<MissedOrder = {"0"}>}[OrderID])  >=1 , '0', count(distinct{<MissedOrder = {"1"}>}[OrderID]))

thanks team

View solution in original post

3 Replies
sunny_talwar

See if this helps

Count(DISTINCT {$<MissedOrder = {'1'}>} OrderID) + Avg({1} 0)

joeybird
Creator III
Creator III
Author

Hi

did not work sorry

Sorry also the MissedOrder column in the load is 1 or 0

Please help

joeybird
Creator III
Creator III
Author


Hi

got it working

if (count(distinct{<MissedOrder = {"1"}>}[OrderID])  =0 , '0', count(distinct{<MissedOrder = {"1"}>}[OrderID])) +

if (count(distinct{<MissedOrder = {"0"}>}[OrderID])  >=1 , '0', count(distinct{<MissedOrder = {"1"}>}[OrderID]))

thanks team