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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
cfountain72
Creator II
Creator II

Pass field name's value to expression/variable

Hello,

I am trying to create a turnaround time, where the user selects the Base Start Time from three one of the three possible fields: Arrival Time, Inpatient Admit Time, Outpatient Admit Time.

So if the user selected Arrival Time, the result would be Event Time -Arrival Time. I could use an If statement, but was wondering if there's a more efficient way to do this. I tried Event Time - Base Start Time, but that obviously doesn't work.

How do I get the actual time stamp inserted into the expression based on the user's field name selection?

Thanks,

Chris

Labels (3)
3 Replies
Or
MVP
MVP

Event Time - $([Base Start Time]) should work, I believe. The magic of dollar-sign expansion! https://community.qlik.com/t5/Qlik-Design-Blog/The-Magic-of-Dollar-Expansions/ba-p/1471979

cfountain72
Creator II
Creator II
Author

Hi Or,

Thanks for the suggestion, but that didn't quite work.

Or
MVP
MVP

Oops. The = at the start of the expansion escaped my message. I found it hiding behind another message.

Event Time - $(=[Base Start Time]) 

Sample:

Or_0-1615918707167.png

 

Or_1-1615918726024.png