Forum Discussion
jac88
4 years agoHelper II
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 wo...
MFelix
4 years agoSuper User
Hi jac88 ,
You need to use an AND statement on your weekend part and also add a next level of IF to mark all the weekened values try the following:
Titles =
VAR NewLine = " / "
VAR Categoryvalue =
CONCATENATEX (
VALUES ( df_ProServUtilizationTracker[Primary Categories] ),
df_ProServUtilizationTracker[Primary Categories],
NewLine
)
VAR Weekendtext =
IF (
MAX ( df_ProServUtilizationTracker[sp_Employees.CalType] ) = "iMetaCal"
&& MAX ( 'VAR vCalendar'[WeekName] ) IN { "Saturday", "Friday" },
"iMETAWeekend",
IF (
MAX ( df_ProServUtilizationTracker[sp_Employees.CalType] ) = "Standard"
&& MAX ( 'VAR vCalendar'[WeekName] ) IN { "Saturday", "Sunday" },
"Weekend"
)
)
RETURN
IF (
MAX ( 'VAR vCalendar'[WeekName] )
IN { "Saturday", "Friday" }
&& Categoryvalue
& IF ( Weekendtext <> BLANK () && Categoryvalue <> BLANK (), NewLine ) & Weekendtext
= BLANK (),
"Weekend",
Categoryvalue
& IF ( Weekendtext <> BLANK () && Categoryvalue <> BLANK (), NewLine ) & Weekendtext
)
jac88
4 years agoHelper II
Hello MFelix
Sorry to be a pest, and thank you so much for the quick response. This is almost perfect, but there is a small issue. For instance, "iMetaWeekend" is Friday showing all the way for all employees. I only need to show employees with the Calendar type "iMetaCal".
Do you know by any chance, how to do it by the employee? One last thing, Sunday is not showing as a weekend. Try to find out why is that, but no luck so far.
Again, thank you so much
- MFelix4 years agoSuper User
Once again sorry but travelling back home will get an answer tomorrow ASAP.