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

Count missmatch

Hi All,

Please find the attachment of Qlikview file ..

I have two tables ..... Table A and Table B ..


My actaul requirement are implemented in Table A .. in which i will be showing the average of 3 years

( Average of last two years including current year) and till date month counts for current year..


Now in Table A iam getting wrong counts for the month of Mar 2018 for Severity 2 and 3 ...( Actual count should be 400 for severity 3 , and 70 for severity 2 ..)

and the correct counts for Mar 2018 are shown in the Table B ..

Please do help me in geting this correct .. there is missmatch in the Mar 2018 month..other than this

Table A is showing proper data for all including the Average..


Thanks in Advance

1 Solution

Accepted Solutions
sunny_talwar

Try this

Pick(Dim,

count({<[When Found]={'Production'},Created={">=$(=Yearstart(Max(LoadDate)))<=$(=TimeStamp(Max(LoadDate), 'DD-MM-YYYY hh.mm.ss'))"}>}Created),

round(Count({<[When Found]={'Production'},Created={">=$(=Yearstart(Max(LoadDate),-2))<=$(=YearEnd(Today(),-2))"}>}Created)/12,0.01),

round(Count({<[When Found]={'Production'},Created={">=$(=Yearstart(Max(LoadDate),-1))<=$(=YearEnd(Today(),-1))"}>}Created)/12,0.01),

count({<[When Found]={'Production'},Created={">=$(=Yearstart(Max(LoadDate)))<= $(=Max(LoadDate))"}>}Created)/$(eAvgyear))

Capture.PNG

View solution in original post

6 Replies
Chanty4u
MVP
MVP

how many dimensions do you have?

remove one by one dimension and check for the result.

sunny_talwar

Try this

Pick(Dim,

count({<[When Found]={'Production'},Created={">=$(=Yearstart(Max(LoadDate)))<=$(=TimeStamp(Max(LoadDate), 'DD-MM-YYYY hh.mm.ss'))"}>}Created),

round(Count({<[When Found]={'Production'},Created={">=$(=Yearstart(Max(LoadDate),-2))<=$(=YearEnd(Today(),-2))"}>}Created)/12,0.01),

round(Count({<[When Found]={'Production'},Created={">=$(=Yearstart(Max(LoadDate),-1))<=$(=YearEnd(Today(),-1))"}>}Created)/12,0.01),

count({<[When Found]={'Production'},Created={">=$(=Yearstart(Max(LoadDate)))<= $(=Max(LoadDate))"}>}Created)/$(eAvgyear))

Capture.PNG

vvira1316
Specialist II
Specialist II

If it is showing right data for other months then are you sure there is no data issue for the month of March. I feel that there may be some data discrepancy. Please check. I think if there was any calculation error then there should have been problem with other information as well.

smilingjohn
Specialist
Specialist
Author

Hi sunny,

Thanks legend you always rock .....

can you please tell me what makes the differnec and this is giving the correct results ..?

it will be more helpfull for me if you can please explain me ..

tahnks

sunny_talwar

Max(LoadDate) was giving a number format back, but Created was a timestamp in DD-MM-YYYY hh.mm.ss format.... it is annoying, but set analysis is very format sensitive... all you needed was to Wrap Max(LoadDate) with the correct formatting

smilingjohn
Specialist
Specialist
Author

Thanks a lot sunny ...