Forum Discussion
How add Weekend for the Custom Title?
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
Hello,
Thank you so much for your response, this is kinda working. I want to show the Weekend regardless of the blank. If there is an event or not it should show up. So I remove the blank part of your formula did not work.
https://drive.google.com/file/d/1tM6gCCZlvoZou2fCs-l8jwG9SDQkRLuF/view?usp=sharing
Thank you so much for your time and help.
- MFelix4 years ago
Super User
Hi jac88,
Did you tried my formula?
The blank part that I use is only to avoid having the / on the measure if you don't have events.
- jac884 years ago
Helper II
Hi MFelix
I have to change the filter direction and made a small change to your formula. So what I am trying to do is based on CalType, weekend days are different. For instance, "iMetaCal" weekends are Friday and Saturday. Rest is a normal weekend (Saturday and Sunday).
Somehow my one is not working the way I want. I
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 Categoryvalue & IF ( Weekendtext <> BLANK () && Categoryvalue <> BLANK (), NewLine ) & WeekendtextIf you have a few more minutes, can you please take look at why my changes are wrong? I truly appreciate your help and time. I am so close.
https://drive.google.com/file/d/1tM6gCCZlvoZou2fCs-l8jwG9SDQkRLuF/view
Thank you
- MFelix4 years ago
Super User
I was looking at your model and since you have the bi directional filter it's not giving correct result I will check and get back to you