Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a straight table with columns as Employee, country and ten different date type columns. I have taken Employee and country as dimensions and transaction date as calculated dimension as below
if(country='US',Date([transaction date],'MM/DD/YYYY',Date([transaction date],'DD/MM/YYYY')
This is not giving me correct results, but when the same is converted as expression the same is working fine.
But due to the number of expressions, dashboard is taking so much time to load and sometimes getting error as "out of object memory" as there is huge data that is being considered in the straight table
Any suggestions on how to best handle this?
You can convert date format in the script and use it in the front end.
But, why you want different date format for each country. If you are using the date in set analysis, how you define the date format in it??
Or create one field with date format for each country, and use in the expression like below
Load * Inline
[
Country, DateFormat1
US, DD/MM/YYYY
IND, MM/DD/YYYY
];
=Date([transaction date], DateFormat1)
Hope it helps
Thanks for your response. The business requirement is to have multiple date formats for various countries. I am using the below one in the calculated dimension
if(country='US',Date([transaction date],'MM/DD/YYYY',Date([transaction date],'DD/MM/YYYY')
Can you please give example how we can use this is in the set analysis
Create one inline table with country n date format and use in the front end.
Load * Inline
[
Country, DateFormat1
US, DD/MM/YYYY
IND, MM/DD/YYYY
];
Front end
=Date([transaction date], DateFormat1)
Thanks for your response. I have made the changes accordingly. I am able to see the format correctly but the date refuses to change when the formatted date is used to change the format. Attaching ss for reference
inline_table:
Load * inline
[COUNTRY,Dateformat1
US,'MM/DD/YYYY'
AU,'DD/MM/YYYY'
UK,'DD/MM/YYYY'
];
There is no single quotes required.
Can you please send sample file..
Hi without quotes also not working.
Please find the sample.xls file.
Hi
I think you can check if the association has "$ Syn".
Because your script is not complicated, it should not be slow.
The following is my script, hope it helps 🙂
Pick(Match(country, 'US', 'AU', 'UK'), Date([transaction date], 'MM/DD/YYYY'), Date([transaction date], 'DD/MM/YYYY'), Date([transaction date], 'DD/MM/YYYY'))
PFA