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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Change the value of working days with user input

I have a pivot table in which I'm calculating the amount of working days as Cycle1_WD + Cycle2_WD + Cycle3_WD,per year..
How can I modify the expression so that, if a Cycle is selected, the "working days" value equals the value of the Cycle<cycle_number>_WD, and if none is selected, the "working days" expression is calculating Cycle1_WD + Cycle2_WD + Cycle3_WD?

Cycle1_WD,Cycle2_WD,Cycle3_WD are variables calculated in the loading script.

2 Replies
darrell_tobin
Creator
Creator

sum(

     If (

     (count(Distinct Cycle) = 1 and Cycle = 'Working days'),

     Cycle<cycle_number>_WD,

     Cycle1_WD + Cycle2_WD + Cycle3_WD

     )//if close

     )//sum close

This may work.

logic is more

Anonymous
Not applicable
Author

Cycle is a field in my table that can take one of the three values: Cycle1,Cycle2,Cycle3. The value of the Cycle field filters the activities by its value.
I need an expression like:

if(<Cycle is selected with value x>, Cyclex_WD, Cycle1_WD + Cycle2_WD + Cycle3_WD)