Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Issue with where Function

Dear Experts,

Good Afternoon,

i tried to apply filter on script side dashboard to get only FACT IDs= 'ACTV' records.

when i written this function on script side all the expressions would displaying '0' values.

with out where function all expression working file. any other way to filter the data to get only ACTV records,

please suggest me.

please find the below sample app for reference

Many Thanks,

Niranjan

1 Solution

Accepted Solutions
sunny_talwar

I think the issue is with you MonthYear field here. Its somehow not read correctly in your qvw where you have used the where statement. I changed the format from the numbers tab on document properties and everything started working again.

Capture.PNG

You can also do this in the script:

Date(MonthYear, 'MMM YY') as MonthYear

View solution in original post

6 Replies
sunny_talwar

Would you be able to share a file where you have not used Where statement? It seems to be working the way I would expect. May be there is no data when you only have ACTV?

avinashelite

Did you check whether you the data for FACT IDs like ACTV ??

Currently I am using personal addition , could you please share the script and expression

NavinReddy
Creator II
Creator II
Author

Hi Avinash,

Thanks for your reply, here is the expression im using

=Count(DISTINCT{<Month=, MonthYear={">=$(=date(MonthStart($(vMonth),-2),'MMM YY'))<=$(=Date($(vMonth),'MMM YY'))"}>}FCT_SETUP_ID)&

' '&'('&

num(num(Count(DISTINCT{<Month=, MonthYear={">=$(=date(MonthStart(max(MonthYear),-2),'MMM YY'))<=$(=Date(max(MonthYear),'MMM YY'))"}>}RAG_RATING_CD)/

Count(DISTINCT{<MonthYear=,  MonthYear={">=$(=date(MonthStart(max(MonthYear),-2),'MMM YY'))<=$(=Date(max(MonthYear),'MMM YY'))"}>}Total <MonthYear>RAG_RATING_CD)),'###%')&')'

Many Thanks,

Niranjan

NavinReddy
Creator II
Creator II
Author

Hi Sunny,

Thank you for your reply,

please find the another QVW, with where condition working as expected.

Many Thanks,

Niranjan

sunny_talwar

I think the issue is with you MonthYear field here. Its somehow not read correctly in your qvw where you have used the where statement. I changed the format from the numbers tab on document properties and everything started working again.

Capture.PNG

You can also do this in the script:

Date(MonthYear, 'MMM YY') as MonthYear

NavinReddy
Creator II
Creator II
Author

Hi Sunny,

Excellent Answer Thank You very much its working for me.

Many thanks,

Niranjan