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
pkardash
Frequent Visitor

Timebrush max date

I have a report where I use a "Timebrush" visualization and a "Stacked bar chart" that display a measure (reads of articles). I wanted to display articles that have been published in the last 10 days instead of all the articles. To do that I have created a column that calculates if the article date is within the last 10 days compared to Max date (which can be filtered using Timebrush). All works great until I use the Timebrush to filter on couple of week say in May. All data disappears from the bar chart. The reason that happens is that the Max date calculates itself in the context of each row, so it never sees what's the max value Timebrush has selected. Does anyone know how I can detect the max value of Timebrush so that I can use that date on my other calculations? 

2 REPLIES 2
ankitpatira
Community Champion
Community Champion

@pkardash I see what you mean, you want max date to be set as selection that you make on timebrush visual.

 

I think what you will need to do is create a duplicated column of your original date column.

Then use that duplicated column for timebrush visual (so that you can write measure to get max date based on selection).

Then write measure that gives you max date from that column (this will give you filtered based on your selection on visual). 

 

Create calculated column, that compares your original date column with the measure you wrote on above step. Now you will have calculated column that will do comparison based on selection you make on timebrush visual.

My issue is with the step, "then write measure that gives you max date from that column (this will give you filtered based on your selection on visual)". Any chance you could post an example?

 

My problem here is that I can get the max date if it's for the whole table, but I need that max date to change in every row of the table in a specific column, so that I can use it in a formula.

 

Right now I use

MaxDateForLast7DaysCalc = CALCULATE(MAX('Post'[Date]),ALL('Post'))

However, this max value doesn't get adjusted when Timebrush gets filtered. 

 

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.