Forum Discussion

sraj's avatar
sraj
Icon for Responsive Resident rankResponsive Resident
4 years ago
Solved

calendar table with Sunday

Hi there,

 

I have created a calendar table separately because I wanted to showcase the days of the week and I used the below to create a column called MONTH DAY

Month Day = FORMAT([Date],"MMM dd") & " " & FORMAT('Calendar Table'[Date],"dddd")
 

 

But now I have the request to show only Sunday as the day on there like for e.g. Dec 01, Dec 02, Dec 03, Dec 04, Dec 05 Sunday, Dec 06, Dec 07, Dec 08, Dec 09, Dec 10, Dec 11, Dec 12 Sunday.  Can someone please advise if there is something I can add to the function to achieve this??

 

 

  • sraj 

    My test seems to show this works:

    Month Day = FORMAT([Date],"MMM dd") & " " & IF( FORMAT([Date],"dddd") = "Sunday", FORMAT([Date],"dddd", "" ))

    Might be a cleaner way write it, but the concept works.

    Hope it works out for you.

    Regards,

7 Replies

  • rsbin's avatar
    rsbin
    Icon for Community Champion rankCommunity Champion

    sraj 

    My test seems to show this works:

    Month Day = FORMAT([Date],"MMM dd") & " " & IF( FORMAT([Date],"dddd") = "Sunday", FORMAT([Date],"dddd", "" ))

    Might be a cleaner way write it, but the concept works.

    Hope it works out for you.

    Regards,

    • sraj's avatar
      sraj
      Icon for Responsive Resident rankResponsive Resident

      Thanks for responding!!  I am not very good with this so I dont know how to correct these squiggle errors

       

       

      • rsbin's avatar
        rsbin
        Icon for Community Champion rankCommunity Champion

        sraj,

        Please copy and paste your formula as text (like you did in your original post) - not as a picture.  I will try to see if I can spot the error.

  • sraj's avatar
    sraj
    Icon for Responsive Resident rankResponsive Resident

    Yes, that worked.  Thanks for pointing it out!!

    • rsbin's avatar
      rsbin
      Icon for Community Champion rankCommunity Champion

      sraj,

      Glad that you got it to work.  Happy to help!