Forum Discussion

vjnvinod's avatar
vjnvinod
Impactful Individual
1 year ago
Solved

Crossh highliting issue

hi,

 

when i select my slicer i want to cross highlight, but its currently filtering out my visual see below. if i do the edit interaction it will show everything but not highligting what i have selected

 

is there any workaround?

 

 

 

 

  • Your measure is probably returning zero. Can you try if([measure]<>0, [measure]) as the custom label.

     

     

14 Replies

  • ahmedoye's avatar
    ahmedoye
    Responsive Resident

    Slicers are designed to filter by default and can't filter. The other option you have to use that is close to your type of slicer is Tree Map. With some careful formatting you can have something close.

     

    1. Put the data category in Category field
    2. Add the category again to Values and set the summary it to DISTINCTCOUNT
    3. Change the Edit Interactions to Highlight
    4. Format the Treemap to look as close as possible to what you can use.

    If you believe this is useful and can solve the challenge for you, kindly mark this as solution so any other persons with similar issues can find it useful.

     

     

    • vjnvinod's avatar
      vjnvinod
      Impactful Individual

      ahmedoye   danextian  thanks, there are 2 challenges again,

      1) i loose Select all option

      2) when i use tree visual, for example when i selected ADDC,  for my other 2  data label values are showing 0, see below screenshot

       

       

      • danextian's avatar
        danextian
        Super User

        Hi vjnvinod 

         

        What we're doing is a workaround which can means we lose some features in favor of the others. No selecting any category should select all.

         

        Your data label's display units is set to millions so a very small value relative to others will make it appear zero. You can increase the decimal units or use a custom label. Sample DAX below.

         

        Custom Label =
        VAR SafeLog =
            IFERROR ( ABS ( INT ( LOG ( ABS ( [Total Revenue] ), 1000 ) ) ), 0 )
        VAR dp = 1
        RETURN
            IF (
                ABS ( [my measure] ) < 1000,
                FORMAT ( [my measure], "#,#" ),
                ROUND ( DIVIDE ( [my measure], 1000 ^ SafeLog ), dp )
                    & SWITCH ( Safelog, 1, "K", 2, "M", 3, "bn", 4, "tn" ) & ")"
            )
        

         

  • Hi vjnvinod 

     

    Slicers function differently by either filtering other visuals or leaving them unchanged. As an alternative, you can use a treemap to mimic the behavior of a slicer. This involves creating a dummy measure with a constant numeric value. For instance, in the example below, a treemap with a dummy measure set to a value of 1 is used to cross-filter the column chart displayed beneath it.