Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Dynamic title

Hi,
 
I have this as a dynamic title
 
Selected Year1 = "Sales and Pipeline Report for " & SELECTEDVALUE('Business area'[Business Area ]) & " " & SELECTEDVALUE('New Date Table'[year].[Year]) & " "
 
Is there a way to add UK as defualt when there is no selection or all selected
  • Hi, Anonymous ;

    You could modify the measure like below:

    Selected Year1 =
    "Sales and Pipeline Report for "
        & IF (
            CALCULATE (DISTINCTCOUNT ( 'Business area'[Item Code] ),ALL ( 'Business area' ))
                = CALCULATE (DISTINCTCOUNT ( 'Business area'[Item Code] ), ALLSELECTED ( 'Business area' )),
            "UK",SELECTEDVALUE ( 'Business area'[Item Code] )) & " "
        & SELECTEDVALUE ( 'New Date Table'[year].[Year] ) & " "

    The final output is shown below:

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Anonymous ;

    You could modify the measure like below:

    Selected Year1 =
    "Sales and Pipeline Report for "
        & IF (
            CALCULATE (DISTINCTCOUNT ( 'Business area'[Item Code] ),ALL ( 'Business area' ))
                = CALCULATE (DISTINCTCOUNT ( 'Business area'[Item Code] ), ALLSELECTED ( 'Business area' )),
            "UK",SELECTEDVALUE ( 'Business area'[Item Code] )) & " "
        & SELECTEDVALUE ( 'New Date Table'[year].[Year] ) & " "

    The final output is shown below:

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.