Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
cm_adil_ch
Contributor II
Contributor II

restrict the report output on the basis of parameter

Hello Qlik Community,

I have to restrict the report output on the basis of parameter. I am unable to ristrct the output when i am using follwing expression in expression editor.

=getselectedcount(Text(replace(APINV2_INVOICE_NUM, chr(39), '')))>=1

but on other side i have another parameter which i am using like
= GetSelectedCount(CHK2_CHECK_DATE )>=1          then it is working

 

then why it is not working with Text(replace(APINV2_INVOICE_NUM, chr(39), '')) and i amusing this field as parameter and as column in report area.



quick help is much appreciated

 

Thanks 

Labels (1)
6 Replies
marcus_sommer

Getselectedcount() expects a native field/dimension as parameter - on the outside of it you may add further function but not inside. Beside this your string-functions on a count-value doesn't make much sense - did you want instead to use getfieldselections() ?

- Marcus 

cm_adil_ch
Contributor II
Contributor II
Author

Thanks Mark for your response.

Actually, I am using this expression in parameter and report output area to show the columns in this way =Text(replace(APDIM2_VENDOR_NUMBER, chr(39), ''))  

user wants me to restrict the report on the basis of  Vendor number. So when i use just simple column name in expression editor to restrict the report like this APDIM2_VENDOR_NUMBER then its not working on that point.
And when i use this =Text(replace(APDIM2_VENDOR_NUMBER, chr(39), ''))  then it is not restricting the report. My report shows all the data till inception.

I need the way , how can i use this to restrict the report on the basis of this expression.

BR

Adil

marcus_sommer

I'm not really sure that I understand what do want to do but it looks that you want to match a dimension-value with a per string-functions adjusted dimension-value. This couldn't work.

I suggest not to try to solve your challenge on this level else transferring it into the script and adjusting the field there or maybe to double the field - one time with your special formatting respectively string-representation and one time as a purely numeric value which is then used for your matching.

- Marcus 

cm_adil_ch
Contributor II
Contributor II
Author

Hello Marcus,

I want to add this expression in add-on section to restrict on this parameter. When i try to use this in add-on section in expression editor then there is no parameter working/restrict the report and report shows the whole data. data is huge that's why it goes in error.

As you can see in screen shot. It is my calculation condition, but it didn't work

marcus_sommer

Personally I don't use getselectedcount() for calculation-conditions because it relates only to one field and usually there are multiple dimensions included in such big objects. Of course you could combine multiple getselectedcount() with any operators but depending on the dimensions and their values it could be difficult to define them properly.

My approach for such occasions is the following:

count(distinct Dim1&Dim2&Dim3) < 10000

whereby Dim1&Dim2&Dim3 are the used dimensions from the object.

- Marcus

cm_adil_ch
Contributor II
Contributor II
Author

hello,

Well thanks for your input, but still its not working in my case. Because , i should have to use this Text(replace(APINV2_INVOICE_NUM, chr(39), '')) in expression or APINV2_INVOICE_NUM in the expression. Because i have to restrict the report data on the basis of this value. Count is also not working in this scenario. When i use this APINV2_INVOICE_NUM  then report shows nothing