Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
vjnvinod
Impactful Individual
Impactful Individual

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?

 

vjnvinod_1-1733560335167.png

 

 

vjnvinod_0-1733560238270.png

 

1 ACCEPTED SOLUTION

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

 

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

14 REPLIES 14
danextian
Super User
Super User

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.

danextian_0-1733577380730.png

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
ahmedoye
Responsive Resident
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
Impactful Individual
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

 

vjnvinod_0-1733638303963.png

 

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.

 

danextian_0-1733638963364.png

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" ) & ")"
    )

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
vjnvinod
Impactful Individual
Impactful Individual

@danextian  values are indeed in M, see below

 

vjnvinod_0-1733640603590.png

 but when i select the tree map, in this case Transco, other 2 items goes 0

 

vjnvinod_1-1733640638723.png

my measure

 

Actuals =
IF(
    ISBLANK(
        CALCULATE(SUM('GroupOPEXCAPEX'[Value]), 'GroupOPEXCAPEX'[Actual/Budget] = "Actuals")
    ),
    0,  // Return 0 if blank
    CALCULATE(SUM('GroupOPEXCAPEX'[Value]), 'GroupOPEXCAPEX'[Actual/Budget] = "Actuals")  // Otherwise, return the sum
)
 
YTD Budget =
VAR CurrentMonth = CALCULATE(
    MAX('GroupOPEXCAPEX'[DateColumn]),
    GroupOPEXCAPEX[Actual/Budget] = "Actuals",
    'GroupOPEXCAPEX'[Value] > 0,
    ALL(GroupOPEXCAPEX)
)
VAR FilteredBudget =
    CALCULATE(
        [Budget],
        'GroupOPEXCAPEX'[DateColumn] <= CurrentMonth,
        YEAR('GroupOPEXCAPEX'[DateColumn]) = YEAR(CurrentMonth),
        MONTH('GroupOPEXCAPEX'[DateColumn]) <= MONTH(CurrentMonth)  // Filter for current and prior months of this year
    )
RETURN FilteredBudget

What values do you expect for those? Unless they're blank like in the screenshot in my previous reply, data labels will not appear. Also, check for decimals.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
vjnvinod
Impactful Individual
Impactful Individual

there are values  and bigger values in millions, but Treemap selection is making them 0, that is the problem statement

question is , why is it returning 0, when the values are big and in millions like in my previous screenshot

 

It is weird that treemap will make them zero. Try using a matrix or a table crossfilterd by a treemap to check  if they return zero










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
vjnvinod
Impactful Individual
Impactful Individual

@danextian 

 

see below, in the table its filtering out and in the visual its highligting but turning the values to zero

vjnvinod_0-1733659016774.png

 

I'm confused. You've selected AADC and the column chart values match those that are in the table. And since this is supposed to be cross-highlighting all other non-selected categories will still be visible but not highlighted.. What values do you expect to see from them other than those what's shown in the table?










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
vjnvinod
Impactful Individual
Impactful Individual

@danextian  issue here is all other non selected categories "Data label" is 0, i want to still show the datalabel when its Cross highligting

As  shown in your screenshot is exactly what cross-highlighting does. Categories that are not selected or don't have a slice will show zero or blank.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
vjnvinod
Impactful Individual
Impactful Individual

@danextian , okie may be thats how it works, so how do i avoid showing them as zero

possible to show them as blank ? do i have to write some measure?

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

 

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.