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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mrqs97
Regular Visitor

How to Create Animated Treemap with Overlapping Date Ranges

I am using the Play Axis custom visual to create an animation of a treemap. This treemap uses coloring that is based on a gradient from red to green. Essentially, the parameters of the treemap (size of boxes, colors, etc.) are all aggregates based on a specific time frame. The idea is to model the amount of red vs green on the treemap for individual timeframes.

I have used the Play Axis to animate this treemap because I want to see how it changes over time. The issue is that the Play Axis uses only individual dates and not ranges. This is an issue because individual variances between different dates are extreme, and I want to show gradual change.

What I want is overlapping ranges, where each frame in the animation removes the oldest date and inserts the newest date. Thus, if frame 1 showed a treemap aggregated from June 1 - June 5, then frame 2 should show a treemap aggregated from the dates June 2 - June 6. Is there a way to do this?

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

 

Hi @mrqs97 

You need to add to the date table a column for the needed intervals:

Ritaf1983_0-1702097287501.png

modify needed interval

Ritaf1983_1-1702097330773.png

The column that you got will work, but on the play axis it will be formatted as a date time:

Ritaf1983_2-1702097406171.png

To solve this issue you can add a formatted column ( data type text)

Ritaf1983_3-1702097481716.png

as it is a text column you need also to modify the sort order by the date bins

 

Ritaf1983_4-1702097564571.png

now you can put the new formatted column on the play axis

Ritaf1983_5-1702097623333.png

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

1 REPLY 1
Ritaf1983
Super User
Super User

 

Hi @mrqs97 

You need to add to the date table a column for the needed intervals:

Ritaf1983_0-1702097287501.png

modify needed interval

Ritaf1983_1-1702097330773.png

The column that you got will work, but on the play axis it will be formatted as a date time:

Ritaf1983_2-1702097406171.png

To solve this issue you can add a formatted column ( data type text)

Ritaf1983_3-1702097481716.png

as it is a text column you need also to modify the sort order by the date bins

 

Ritaf1983_4-1702097564571.png

now you can put the new formatted column on the play axis

Ritaf1983_5-1702097623333.png

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.