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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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