Forum Discussion
How add Weekend for the Custom Title?
Hi MFelix ,
Thank you so much for your hlep. I just wanted to know why my changes to your formula are not working. It's showing every day now.
Again, thank you
Hi jac88 ,
The issues are related with context that is giving an incorrect result because of the many to many relationship you have, so in this case the Calendar type is not being pickedup correctly by the employe type but by the manager type.
In this case I have made the following chages to your code:
Titles =
VAR calendarType =
CALCULATE (
SELECTEDVALUE ( df_ProServUtilizationTracker[sp_Employees.CalType] ),
ALLSELECTED ( df_ProServUtilizationTracker[sp_Employees.Name] )
)
VAR NewLine = " / "
VAR Categoryvalue =
CONCATENATEX (
VALUES ( df_ProServUtilizationTracker[Primary Categories] ),
df_ProServUtilizationTracker[Primary Categories],
NewLine
)
VAR Weekendtext =
IF (
calendarType = "iMetaCal"
&& MAX ( 'VAR vCalendar'[WeekName] ) IN { "Saturday", "Friday" },
"iMETAWeekend",
IF (
calendarType = "Standard"
&& MAX ( 'VAR vCalendar'[WeekName] ) IN { "Saturday", "Sunday" },
"Weekend"
)
)
RETURN
Categoryvalue
& IF ( Weekendtext <> BLANK () && Categoryvalue <> BLANK (), NewLine ) & Weekendtext
Has you can see the change on the code is the fact that instead of using the MAX directly to get the CalType i'm making a Calculation of the CalType but restricted by the enmploye name (ALLSELECTED part) this allows to get for that specific person the calendar type.
- jac884 years agoHelper II
Hi MFelix
Thank you so much, last few days I was trying to figure out messing the Dax, and adding stuff to all select sections. Still not luck.
For the caltype = iMeta Saturday is missing. Also, not all people show weekend lable.Again, thank you so much for your time and help.
- MFelix4 years agoSuper User
Hi jac88 ,
Your issue is that the data for those specific dates are not in your model: so you are getting null values so the weekend information is not going trough. This is also happening in other valueseven when the calendar is no imeta.
I need to try some different approach, please have some patience.