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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Haeser
Frequent Visitor

Limit date with button

Hello, good morning!

I would like to limit the date from my data, based on a selected button.

example1.jpg

Right now, i have 4 measures, ID from selected button, first data date, todays date, and last updated data. On the screen, i have a button (ChicletSlicer), where it says "today" or "last update", that are affiliated to an ID.
example2.jpg

I tried several ways to filter the data, but without success (including datesbetween, filter, etc). What would be the correct way to accomplish this?

Thanks in advance! 

3 REPLIES 3
PijushRoy
Super User
Super User

Hi @Haeser 

Requirement is not clear to me, can you please share pbix and expected result.




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Hi @PijushRoy , thanks for the quick response!

Unfortunately, I can't share the pbix, but the expected result would be that when selecting "Hoy" in the upper Chiclet, data would be filtered up to today's date. And when "Ultima Carga" was selected, the last date would be different, according to the "DataFiltrada" measure, as shown in the image.

My difficulty is in the measure syntax to use this limit, for example, i tried: measure = FILTER(myTable, myTable[date], DATESBETWEEN(firstDate, lastDateSelected)) , to limit my last date on all tabs, but it was not successful.

Hi @Haeser 

Not having a sample file to test, so I am not very sure. Maybe you could try the measure below to check the period,

measure= 
  var _timeMin= calculate(min(myTable[date]),FILTER(myTable, myTable[date], DATESBETWEEN(firstDate, lastDateSelected)) )
  var _timeMax= calculate(max(myTable[date]),FILTER(myTable, myTable[date], DATESBETWEEN(firstDate, lastDateSelected)) )
return _timeMin & unchar(10) & _timeMax

 

Best Regards,

Community Support Team _Tang

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.