Changing Date Format in Period over Period Additional Text

b_rad
b_rad Contributor

Hi,

I have a Period over Period Multivalue chart.

I am comparing yesterday's number vs same day a week ago. When I add the CURRENT_PERIOD_DATE AND PREVIOUS_PERIOD_DATE in the "Additional Text" they show up like below (2021-04-11 and 2021-04-04).

Is there any way to change the format? I want it to show up as 04-11 vs 04-04.


Thanks,

Bharath.



Answers

  • Hi @b_rad

    Are the CURRENT_PERIOD_DATE and PREVIOUS_PERIOD_DATE columns in your dataset? Do you have a sample screenshot of where you're entering this information? You might be able to utilize the DATE_FORMAT(`date_field` , '%m-%d') function to help format your dates.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • b_rad
    b_rad Contributor

    No. Its a macro that Domo allows to you in the "Additional Text Options". See screenshot below.



  • They are likely following the format of the time period field. Click on the pencil icon in your time period field and choose format and try date shorthand and see if that changes how it is displayed.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • b_rad
    b_rad Contributor

    I tried it already but for whatever reason, it doesn't give me a date format option for the date field. It only gives Number, Currency, Percentage option. See screenshot below.



  • That is a definite shortcoming. That would be worth submitting as an enhancement request to allow for date formatting.

    In the meantime, I think you can still get your card to work by using the tooltip fields. Create a couple beast modes that have the dates that you want in the format you want and put them in tooltip fields 1 and 2. Then reference those in the additional text options.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • Hi @b_rad

    The Domo Period over Period charts have their shortcomings. You likely won't be able to format it in a tool tip because you don't have access to the last week value in your beast modeI typically use a date offset dimension table which allows me to define my own offsets like last week, last month, last year (day of week aligned).

    Essentially you'd have a record for each offset for whatever date you're reporting on. This would then allow you to have access to the dates from last week to do a custom format on. I've written about the offsets before, see https://dojo.domo.com/discussion/comment/50540#Comment_50540


    You'd then just need to get the min date for last week values and do a custom format on the value via DATE_FORMAT() in a beast mode and put that into a tooltip as @MarkSnodgrass suggested.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**