Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master III

Expression Issue Help !

Ho Folks,

I'm not sure if this is because of my data model , but I'm facing issue with below bar chart.

Instead of showing all Defect_Desc. , bar is only showing "Appearance".

Dimension: =if(Month<>Month(today()),SubField(Defect_Description,'-',1))

Expression:

sum(aggr(Sum({<Complaint_Acceptance-={4,5,6,7}>} QTY_PPM*Top_Pos_Flag) /

(Sum ({<Complaint_Type = {1, 3}>} QTY_Delivered_TOTAL) + Sum ({<Complaint_Type = {2, 7}>} QTY_Received_TOTAL)) *1000000,%MANDANT_Key))

Kindly help!

Thanks,

AS

16 Replies
tresesco
MVP
MVP

Could you post your qvw with sample data?

MK_QSL
MVP
MVP

Try Calculated Dimension as below

Aggr(if(Month<>Month(today()),SubField(Defect_Description,'-',1)),Defect_Description)

marcus_sommer
MVP & Luminary
MVP & Luminary

I would probably not use this kind of calculated dimension and adjust and/or split the field Defect_Description within the script and put the condition within the expression maybe like this:

Date = {"<date(monthstart(today(), 'YourFormat')"}

Further I would use rangesum(sum1, sum2) instead of sum1 + sum2 and maybe a further alt() to catch possible NULL or errors.

- Marcus

amit_saini
Master III
Master III

Hi Tresesco,

PFA

Thanks,

AS

amit_saini
Master III
Master III

Hi Manish,

Same issue

Thanks,

AS

sunny_talwar

Does this look like something you want?

Capture.PNG

I added NODISTINCT to the expression:

=Sum(Aggr(NODISTINCT Sum({<Complaint_Acceptance-={4,5,6,7}>} QTY_PPM*Top_Pos_Flag) /

(Sum ({<Complaint_Type = {1, 3}>} QTY_Delivered_TOTAL) + Sum ({<Complaint_Type = {2, 7}>} QTY_Received_TOTAL)) *1000000,%MANDANT_Key))

amit_saini
Master III
Master III

Hi Sunny,

No!

Sum out of bars should be 97.

Thanks,

AS

sunny_talwar

You mean if we sum all the bars it would total to 97?

amit_saini
Master III
Master III

Yes!