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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniel77
Creator
Creator

All Bars in a chart incorrectly show the same result after a filter is made

Hi,

Hoping someone can assist.

I have a bar chart using only Measures to show the bars. I am showing the difference between and order date and a data received date to determine the time it took the user to place an order

[Order Date] - minSendDate

In the Bars i use an If to say if between 1 and 3 count the PO's.

Examples:

count(distinct if([T&R]= 1 and [Order Date] - minSendDate >6.99,TNRPO))

This would show in the >7

count(distinct if([T&R]= 1 and [Order Date] - minSendDate >3 and [Order Date] - minSendDate >4.99,TNRPO))

The chart is working fine.

Daniel77_0-1729594215275.png

In the above, i have filtered a company name and the result is as expected. My Issue is when i select 1 of the PO's (using the same dimension as in the count)

I select a PO which is in the >7 bar but the chart shows a count of 1 in all bars!

Daniel77_1-1729594326115.png

How can i change the expression to only show the selected PO in the correct Bar please?

Thanks for the support in advance.

regards

Labels (4)
2 Replies
Kushal_Chawda

@Daniel77  Your expression looks fine. It seems you have multiple records for TNRPO and each record is falling into different buckets for eg. >7 , >5 and <7. This might be the reason you are seeing all  bars when you are selecting one TNRPO. You could share sample dummy data with expected output in excel to help with?

marcus_sommer

I wouldn't go with such an approach else calculating the information within the data-model, like:

load *, class(Offset, 2) as OffsetCluster;
load *, date1 - date2 as Offset from X;

and then a simple count() should against the cluster as dimension should return the wanted view.