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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
vignesh_s
Creator
Creator

hi,,,,about class()

=class(num(OrderDate-$(Vartoday)),$(varWidth),'dt')     can any one explain this

Labels (1)
1 Solution

Accepted Solutions
Anil_Babu_Samineni
MVP
MVP

Read this? http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/ConditionalFunctions/cl...

In your case,

class(expression, interval [ , label [ , offset ]])

(Order-$(Vartoday)) // It calculates the difference b/w two dates. And $(varWidth) // It is the interval where comes from variable. dt is the calculation between the ranges.

Note - If you look, Help you may understand each


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

7 Replies
Anil_Babu_Samineni
MVP
MVP

Read this? http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/ConditionalFunctions/cl...

In your case,

class(expression, interval [ , label [ , offset ]])

(Order-$(Vartoday)) // It calculates the difference b/w two dates. And $(varWidth) // It is the interval where comes from variable. dt is the calculation between the ranges.

Note - If you look, Help you may understand each


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vignesh_s
Creator
Creator
Author

but im nt geting in date formateclass.png

Anil_Babu_Samineni
MVP
MVP

Can you show full cell rather hash code. And What if we remove dt in your statement?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vignesh_s
Creator
Creator
Author

now im geting like disclass.png

Anil_Babu_Samineni
MVP
MVP

Seems, Okay. What is the wrong?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vignesh_s
Creator
Creator
Author

in field date range im geting value instead of 'date'

Anil_Babu_Samineni
MVP
MVP

May be this?

class(Date(OrderDate-$(Vartoday)),$(varWidth),'dt')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful