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: 
griffin2571
Contributor
Contributor

Variable in Set Analysis Not Capturing Data

I used a set analysis to capture the next date on column "Next Repair Date" using script =DATE(MIN({<[Next Repair Date] = {">=$(=TODAY())"}>} [Next Repair Date])). Next I stored the expression in a variable and used another set analysis to capture column "Car Repair Maintenance Service" based off of the Next Repair Date set analysis using =only({<Date={'$(=$(NextRepair))'}>} [Car Repair Maintenance Service]). However, I get nothing when I apply this expression. What is causing my set analysis to not capture any data? It show capture data Engine Modifications based off this script.

 

 

Sample Data Below

Car VIN Number Next Repair Date Manufacturer Date Log Complex Field Team Name Repair Plan Car Repair Maintenance Service
             
9000000405 5/28/1945 3/16/2021 OC CON Planned Modification
9000000405 11/6/2035 5/28/2013 OC CON Planned Modification
9000000405 11/10/2022 11/16/2010 OC CON Planned Modification
9000000405 10/25/2022 11/6/2012 OC CON Planned Engine Modifications
9000000405 10/28/2022 - SA ORG - Full Service
9000000405 12/25/2022 - SA ORG - Engine Modifications
Labels (4)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Try below

=only(
{< NextRepairDate ={'$(=MIN(total {<[NextRepairDate] = {">=$(=TODAY())"}>} [NextRepairDate]))'}
>} CarRepairMaintenanceService )

 

OR

Change the variable definition as below

NextRepair     =MIN({<[Next Repair Date] = {">=$(=TODAY())"}>} [Next Repair Date])

Measure :    

only(
{< NextRepairDate ={'$(=NextRepair)'}
>} CarRepairMaintenanceService )

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

1 Reply
vinieme12
Champion III
Champion III

Try below

=only(
{< NextRepairDate ={'$(=MIN(total {<[NextRepairDate] = {">=$(=TODAY())"}>} [NextRepairDate]))'}
>} CarRepairMaintenanceService )

 

OR

Change the variable definition as below

NextRepair     =MIN({<[Next Repair Date] = {">=$(=TODAY())"}>} [Next Repair Date])

Measure :    

only(
{< NextRepairDate ={'$(=NextRepair)'}
>} CarRepairMaintenanceService )

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.