Forum Discussion

jac88's avatar
jac88
Icon for Helper II rankHelper II
4 years ago

How add Weekend for the Custom Title?

Hello, 

 

I have created a custom title by combining "Primary Category" data. I need to add "WeekEnd" when it is Saturday or Sunday. I tried this using creating two columns below, but it did not work. Somehow it will show the wrong category combined and "WeekEnd only shows one person.

Column = VAR NewLine =
"
/
"
RETURN
CONCATENATEX(VALUES(df_ProServUtilizationTracker[Primary Categories]), df_ProServUtilizationTracker[Primary Categories], NewLine)
Title test = IF(ProDetail_CrossJoin_test[WeekName] = "Saturday" || ProDetail_CrossJoin_test[WeekName] = "Sunday", "WeekEnd", ProDetail_CrossJoin_test[Column])

Is there a way I can join "WeekEnd" to the title based on Saturday and Sunday? 

 

This may be a little confusing, please see the attached file. 

https://drive.google.com/file/d/1TR96CWb-itIS7SqU7ByrhrI1FQL6of3m/view?usp=sharing 

 

Thank you so much 

17 Replies

  • Hi jac88 ,

     

    Try the following code:

     

    Titles =
    VAR NewLine = " / "
    VAR Categoryvalue =
        CONCATENATEX (
            VALUES ( df_ProServUtilizationTracker[Primary Categories] ),
            df_ProServUtilizationTracker[Primary Categories],
            NewLine
        )
    VAR Weekendtext =
        IF ( MAX ( 'VAR vCalendar'[WeekName] ) IN { "Saturday", "Sunday" }, "Weekend" )
    RETURN
        Categoryvalue
            & IF ( Weekendtext <> BLANK () && Categoryvalue <> BLANK (), NewLine ) & Weekendtext