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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dosaril
Contributor III
Contributor III

variables / master Calander

hello 

 

i have kpi calculates open depends on some conditions , i used submission year as reference of open mdr on which year that mdr open on , so i want when i filter a specific year it show me open mdr depend on the submission year, bellow my expression that i used:

count(distinct{<MDR_Status = {'Open MDR'},[M.Flag] = {'Material'},SUBMISSION_year = {"<=$(=year(vMAX_CAL_YEAR,'YYYY'))"}>}MDR_NUMBER), 

i created variables:

   vMAX_CAL_YEAR  is  =Max(vmdr_year)

 

my concern when i filter 2025 it show me data , but when i select 2024 there are no data are showing

 

thank you 

Labels (5)
1 Solution

Accepted Solutions
SRA
Partner - Creator
Partner - Creator

Hi,

First of all, 'year' function has only one parameter. You cannot specify the format. This means your 'year' function is not working. Check here for more info :

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFun...

You can try something like :

count(distinct{<MDR_Status={'Open MDR'}, [M.Flag]={'Material'}, SUBMISSION_year={"<=$(=vMAX_CAL_YEAR)"}>} MDR_NUMBER)

But, just to be sure, if you select 2025, you want to see all data <= 2025. and if you select 2024 you want to see all data <=2024 (not only 2024). Correct ?

Regards

SRA

View solution in original post

1 Reply
SRA
Partner - Creator
Partner - Creator

Hi,

First of all, 'year' function has only one parameter. You cannot specify the format. This means your 'year' function is not working. Check here for more info :

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFun...

You can try something like :

count(distinct{<MDR_Status={'Open MDR'}, [M.Flag]={'Material'}, SUBMISSION_year={"<=$(=vMAX_CAL_YEAR)"}>} MDR_NUMBER)

But, just to be sure, if you select 2025, you want to see all data <= 2025. and if you select 2024 you want to see all data <=2024 (not only 2024). Correct ?

Regards

SRA