Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
ZoeM
Specialist
Specialist

Calculated Dimension Date Format

Hi!

I have a calculated dimension (shown below) where I want to show it as a date format, but the date format is not what/how I have asked Qlik to produce.

=Date#( Aggr( Concat( {$<[Date Type]={'Current Dates'},

Gateways={'Design'}>} DISTINCT Date ) ,[MY Program]),'DD-MMM-YY')

The result is MMM,D,YYY when I want DD-MMM-YY. I changed the Document Properties default but that still didn't work.

I tried removing the '#' and using Date() but that did not work either. I tried combining the two and still did not work. 

Any ideas?

 

Labels (2)
1 Solution

Accepted Solutions
vchuprina
Specialist
Specialist

Hi, 

Try this, first change format, then concatenate

Aggr(
Concat( {$<[Date Type]={'Current Dates'}, Gateways={'Design'}>} DISTINCT DATE(Date#(Date, 'MMM,DD,YYY'), 'DD-MMMM-YY'), ',')
,[MY Program])

Regards,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").

View solution in original post

8 Replies
vchuprina
Specialist
Specialist

Hi,

Try this:

=Date(Date#( Aggr( Concat( {$<[Date Type]={'Current Dates'},

Gateways={'Design'}>} DISTINCT Date ) ,[MY Program]), 'MMM,D,YYY') ,'DD-MMM-YY')

Date#() function helps Qlik to recognize Date values, Date() transforms value to the necessary format

Regards,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
ZoeM
Specialist
Specialist
Author

Thanks for the response.

I tried it and it is not giving me any results.

vchuprina
Specialist
Specialist

Could you please share result of this expression?

Aggr( Concat( {$<[Date Type]={'Current Dates'}, Gateways={'Design'}>} DISTINCT Date ) ,[MY Program])

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
vchuprina
Specialist
Specialist

Hi, 

Try this, first change format, then concatenate

Aggr(
Concat( {$<[Date Type]={'Current Dates'}, Gateways={'Design'}>} DISTINCT DATE(Date#(Date, 'MMM,DD,YYY'), 'DD-MMMM-YY'), ',')
,[MY Program])

Regards,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
ZoeM
Specialist
Specialist
Author

Hi Vitalli.

Unfortunately I do not have dummy data that I can share.

I tried the above equation and it did not give me any results. 

vchuprina
Specialist
Specialist

Last expression works fine in my app. 
Check date format of Date column in your table. And update second parameter in date#() function in your expression  .

Also add [MY account] as a dimension to your chart

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
ZoeM
Specialist
Specialist
Author

Please see snip below.

I have the expression above as a Calculated Dimension with Date Header and as you can see below it is blank. 

ZoeM_0-1652805981381.png

When you say to check the format of the Date column in the table, since its a calculated dimension I dont know how to check its format outside of the expression parameters...

ZoeM
Specialist
Specialist
Author

Hi Vitalli

I have to apologize. I went into the document properties and changed the default date formatting and I didn't realize I also needed to restart the application for the change to take effect.

 

I am all set now, thanks for all your hard work and great help!