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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Switching hot(current) and cold(previous) data values on the same table visual using switch/slicer

I am kind of stuck in implemented this idea. Could anybody please help.

 

If I choose Hot, i want to display the current month data and rest will all be the previous. I have already splitted the data as Hot(current month) and cold(previous 3 months). Right now i am getting them to separate tables as shown below for example.

 

Hot Data Table:

Timestamp

Name

ID

Current month date

a1

11

Current month date

a2

12

Current month date

a3

13

Current month date

a4

14

Current month date

a5

15

 

Cold Data Table:

Timestamp

Name

ID

Previous month date

b1

21

Previous month date

b2

22

Previous month date

b3

23

Previous month date

b4

24

Previous month date

b5

25

 

But I want to show them in one single table visual, which dynamically changes values in the table depending on the slicer selection i.e. Hot or cold. 

 

Thank you.

3 REPLIES 3
Jngum
New Member

Phillip I am not sure if you go the solution but the best approach will be to write a measure that aggregates your data in cold then add that to the data in hot. For example ColdMeasure = Sum(cold[data]) and HotMeasure = Sum(Hot[data]) then Hot/Cold= ColdMeasure + HotMeasure. You can use variables also if you want. But this should give you the desired result. 

PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Download sample PBIX file

 

If you have a table with data like this including a column that specifies the row as either hot (this month) or cold (a previous month)

hotcolddata.png

 

then you can use a slicer to filter the data as you describe

colddata.pnghotdata.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Thank you for sharing the solution.

 

The above works fine when i have both the hot and cold data merged together as a single table.
But in my data, there are two tables, 1. Hot data table ( i am getting using import - only the recent 3 months data) and 2. Cold data Table (using direct query - data that is older than 3 months).

So in that case, i want to retrive from two different tables on a single visual. 

Thank you 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.