Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

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

  • 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)

     

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

     

    Regards

     

    Phil

    • Anonymous's avatar
      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 🙂

  • 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.