cancel
Showing results for 
Search instead for 
Did you mean: 
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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.