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: 
priyarane
Specialist
Specialist

Date in Expression

Hi Community,

I have show date in expression depending on selection - date

my date for date is like below

   

42306.496701389
42306.774351852
42307.396550926
42309.655138889
42310.837152778
42310.839803241
42310.840185185

for others I am showing like

Only({<%Month = {'$(=$(=vCurrMonth))'}, %Year = {'$(=$(=vCurrYear))'},CURRENCY = {'$(=$(vCurr))'}>}DESCRIPTION)

but I am not able show date. Can some one please help me

Labels (1)
4 Replies
swuehl
Champion III
Champion III

Only() will only return a value if there is a single possible distinct value returned.

Maybe use another aggregation function like

Min({<%Month = {'$(=$(=vCurrMonth))'}, %Year = {'$(=$(=vCurrYear))'},CURRENCY = {'$(=$(vCurr))'}>} Date)


Or explain more detailed what you want to achieve and how your data model looks like.

sunny_talwar
MVP
MVP

May be something like this:

Only({<%Date = {"$(='>=' & Num(DayStart($(=vCurrDate))) & '<=' & Num(DayEnd($(=vCurrDate))))"}, %Month = {'$(=$(=vCurrMonth))'}, %Year = {'$(=$(=vCurrYear))'}, CURRENCY = {'$(=$(vCurr))'}>}DESCRIPTION)

priyarane
Specialist
Specialist
Author

Thanks Sunny and Swuehl for your reply.

This is working for me

only({<%Month = {'$(=$(=vCurrMonth))'}, %Year = {'$(=$(=vCurrYear))'},CURRENCY = {'$(=$(vCurr))'}>}Date(SUBMISSION_DATE))

Numbe tabl - expression default.

swuehl
Champion III
Champion III

Ok, so your request was about formatting?

Please note that your SUBMISSION_DATE values seem to be timestamp in fact, so you can format them as dates using Date() function for display purposes, but the values keep the decimals.