Forum Discussion

dokat's avatar
dokat
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

Return blank Text when no slicer selection is made

Hi,

 

I have below formula that returns two slicers selection  values as text. However when no slicer is selected it returns all the values from both slicers. I want it to return blank value when there is no selection is made. Can anyone help me?

 

Title =
"US > Dairy> "
& (CONCATENATEX (
VALUES ( 'Dairy'[Dairy] ),
'Dairy'[Dairy])
&
" >"
&

CONCATENATEX (
VALUES ( 'Dairy'[Milk] ),
'Dairy'[Milk],
", "

))

  • Below formula works

     

    Title = "US > Dary"
    &
    If(
    HASONEVALUE('Dairy'[Dairy]),
    " >",
    BLANK()
    )
    &
    SELECTEDVALUE('Dairy'[Dairy],"")
    &
    If(
    HASONEVALUE(Dairy'[Milk]),
    " >",
    BLANK()
    )
    &

    SELECTEDVALUE('Dairy'[Milk],"")

1 Reply

  • dokat's avatar
    dokat
    Icon for Post Prodigy rankPost Prodigy

    Below formula works

     

    Title = "US > Dary"
    &
    If(
    HASONEVALUE('Dairy'[Dairy]),
    " >",
    BLANK()
    )
    &
    SELECTEDVALUE('Dairy'[Dairy],"")
    &
    If(
    HASONEVALUE(Dairy'[Milk]),
    " >",
    BLANK()
    )
    &

    SELECTEDVALUE('Dairy'[Milk],"")