Forum Discussion
Dynamic Title Switcher
- 3 years ago
Hi JLarkin
Please tryTitle - Selection = CONCATENATEX ( VALUES ( DATE_DIM[MNTH_NAME] ), DATE_DIM[MNTH_NAME], " & ", CALCULATE ( MAX ( DATE_DIM[MNTH_NUMBER] ) ), ASC )Title = IF ( COUNTROWS ( VALUES ( 'DATE_DIM'[MNTH_NAME] ) ) = 3 && COUNTROWS ( VALUES ( 'DATE_DIM'[QTR] ) ) = 1, MAX ( 'DATE_DIM'[QTR] ), [Title - Selection] ) & " " & SELECTEDVALUE ( 'DATE_DIM'[YR_NBR] ) & " - Total Sales Bookings"
Hi JLarkin
Please try
Title - Selection =
CONCATENATEX (
VALUES ( DATE_DIM[MNTH_NAME] ),
DATE_DIM[MNTH_NAME],
" & ",
CALCULATE ( MAX ( DATE_DIM[MNTH_NUMBER] ) ), ASC
)
Title =
IF (
COUNTROWS ( VALUES ( 'DATE_DIM'[MNTH_NAME] ) ) = 3
&& COUNTROWS ( VALUES ( 'DATE_DIM'[QTR] ) ) = 1,
MAX ( 'DATE_DIM'[QTR] ),
[Title - Selection]
) & " "
& SELECTEDVALUE ( 'DATE_DIM'[YR_NBR] ) & " - Total Sales Bookings"
- JLarkin3 years agoFrequent Visitor
Hi tamerj1 and ShahabHoghooghi,
Thank you very much to both of you! - mes00122 years agoFrequent Visitor
Thanks tamerj1 i've been scratching my head on something similar for a while, this worked perfectly.
How would i go about layering in YTD? For example, if April - August are selected then return "YTD"?
Many thanks,Matt.
- mes00122 years agoFrequent Visitor
Hi tamerj1 ,
So i'm looking to build a dynamic title that breaks down as follows:- If singular month selected it appears as below
- If two months are selected it appears in a list as below
- If the relevant 3 months are selected for the qtr then return the financial qtr as below
All of the above works perfectly using your original solution.
The bit i'm struggling with is layering in "YTD" if all months are selected. I currently have it structured as below when all months are selected. Instead of a list of the months selected i want it to return "YTD".
Hopefully this makes more sense!
Thanks,
Matt.