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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jeffwash666
New Member

Heatmap slicer

I have the following table:

idLatitudeLongitudeRedGreenBlue

 

I want to create a slicer (or similar) that will have the following options:

  • Red
  • Green
  • Blue

When the user selects Blue, it will show a heatmap of the data only in the Blue column.

 

Any ideas?

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @jeffwash666 ,

 

create a new "slicer table" with the rows "Red", "Green" and "Blue". This you can do in 2 ways:

1. With the "Enter data" function

2. With a DAX table (Modeling --> New Table):

myColorSlicer = DATATABLE (
    "Color", STRING,
    {
        { "Red" },
        { "Green" },
        { "Blue" }
    }
)

 

Add a slicer to your report with the column "color" from the created table. Set the selection control to "Single select", that only one value is selected by the slicer.

 

Then create a measure that checks what is selected with the SELECTEDVALUE function and depending on the result you return the result of the corresponding column:

MyColorSum =
VAR vSlicer = SELECTEDVALUE( myColorSlicer[Color] )
VAR vReturn =
    SWITCH(
        vSlicer,
        "Red", SUM( myTable[Red] ),
        "Green", SUM( myTable[Green] ),
        "Blue", SUM( myTable[Blue] )
    )
RETURN
    vReturn

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

3 REPLIES 3
jeffwash666
New Member

Hi Denis, 

 

This is great, thanks.  I've created the measure and it works.  I now need to tie the selected value to the "Value" property of my Heat Map control.  Do you know how to do that?

 

Cheers,

-Jeff

Hey @jeffwash666 ,

 

sorry, I didn't see the message. Always make sure to link the person like this: @jeffwash666 

Then I will get a notification, otherwise I won't see when you answered.

 

I'm not sure if I fully understand what you mean with tie the value.

I understood that you get the selected color, right? This you can also do with a measure:

SelectedColor = SELECTEDVALUE( myColorSlicer[Color] )

 

Best regards

Denis

selimovd
Super User
Super User

Hey @jeffwash666 ,

 

create a new "slicer table" with the rows "Red", "Green" and "Blue". This you can do in 2 ways:

1. With the "Enter data" function

2. With a DAX table (Modeling --> New Table):

myColorSlicer = DATATABLE (
    "Color", STRING,
    {
        { "Red" },
        { "Green" },
        { "Blue" }
    }
)

 

Add a slicer to your report with the column "color" from the created table. Set the selection control to "Single select", that only one value is selected by the slicer.

 

Then create a measure that checks what is selected with the SELECTEDVALUE function and depending on the result you return the result of the corresponding column:

MyColorSum =
VAR vSlicer = SELECTEDVALUE( myColorSlicer[Color] )
VAR vReturn =
    SWITCH(
        vSlicer,
        "Red", SUM( myTable[Red] ),
        "Green", SUM( myTable[Green] ),
        "Blue", SUM( myTable[Blue] )
    )
RETURN
    vReturn

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors