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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
maternmi
Creator II
Creator II

need help by set analysis


Hello,

I need help by set analyses.

I would like to display the pickup reliability for each selected month in comparision to the total amount of order in this month, unfortunately I don't know how. What I get is the pickup reliability of each month in comparison to the total amount of orders of all selceted months.

The field Pickup_Reliability_Type contains 3 value types, a) not relevant, b) reliable, c) unreliable

The ID is "%VBELN.%UEPOS", its combination of order number and order position

The month filed  C_MonthYear is combination of month and year

My dimensions are C_MonthYear and Pickup_Reliability_Type

I used following expression in the bar chart:

count({$<Pickup_Reliability_Type = {'reliable'}>} distinct %VBELN%UEPOS) / count({$<Pickup_Reliability_Type = -{'not relevant'}>} distinct total %VBELN%UEPOS)

I hope you can help me.

Thanks!

BR

Michael

1 Solution

Accepted Solutions
stabben23
Partner - Master
Partner - Master

Hi put in <C_MonthYear> after distinct total

//Staffan

View solution in original post

17 Replies
tresesco
MVP
MVP

Try like:

count({$<Pickup_Reliability_Type = {'reliable'}>} distinct %VBELN%UEPOS) / count({$<C_MonthYear=,Pickup_Reliability_Type = -{'not relevant'}>} distinct total %VBELN%UEPOS)

maternmi
Creator II
Creator II
Author

Hi,

unfortunately the result is the same. Any further idea?

BR

Michael

tresesco
MVP
MVP

this?

count({$<Pickup_Reliability_Type = {'reliable'}>} distinct %VBELN%UEPOS) / count({1<Pickup_Reliability_Type = -{'not relevant'}>} distinct %VBELN%UEPOS)

If not, please post your sample app.

jagan
Partner - Champion III
Partner - Champion III

Hi Michael,

If you have any other date fields like year, month, week, quarter then exclude those selections in expression like this

count({$<Pickup_Reliability_Type = {'reliable'}>} distinct %VBELN%UEPOS) / count({$<C_MonthYear=, Month=, Year=, Week=, Quarter=, Pickup_Reliability_Type = -{'not relevant'}>} distinct total %VBELN%UEPOS)


or simply use this


count({$<Pickup_Reliability_Type = {'reliable'}>} distinct %VBELN%UEPOS) / count({1<Pickup_Reliability_Type = -{'not relevant'}>} distinct total %VBELN%UEPOS)


Regards,

Jagan.

maternmi
Creator II
Creator II
Author

Hi Tresesco, hi Jagan,

no, that is not what I want to see.  I've selceted three months 09.2013, 10.2013. 11.2013

09.2013  has a  total amount of orders 133, thereof are 34 reliable, that means a reliability of 25,6% but I get 8,83 % because my expression consider the total amount order of the three month which is 385.

But the result must be 25,6%

Does it help you?

BR

Michael

tresesco
MVP
MVP

Could you please post your sample app (with sample data) with desired output explained ?

maternmi
Creator II
Creator II
Author


Please find attached an example

BR

Michael

tresesco
MVP
MVP

Michael,

I guess your sample qvw doesn''t have enough data to test. There is no member called 'not relevant'  in Pickup_Reliability_Type field. Or, am i missing something?

maternmi
Creator II
Creator II
Author

yes, that's right. But I don't need it therefore I use -{'not relevant'}. I just want to get the values mentioned in qvw.

Thanks!

BR

Michael