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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
yakovleva_alena
Regular Visitor

I need create in DAX the button that will be show data with filter on date

I need create in DAX the button that will be show data up to this day (maybe with another filters on date)

Which commands can I use?

9 REPLIES 9
RSC
Helper I
Helper I

Hi @yakovleva_alena ,
Don't know if I understood your problem properly or not, but when you're using this visual (Between Slicer), put the date filed and don't change the value of date in this slicer until you publish this report on power bi services,
I think this can help you.
Thanks

if i do this, i need every day change date on slicer, because every day i need to see data up to current date

ERD
Community Champion
Community Champion

@yakovleva_alena , you need 2 filters for the slicer and a measure.

Measure: 

check date = 
var today = TODAY()
RETURN 
    IF(MAX('Date'[Date]) > today, 0, 1)

Filters:

ERD_0-1695117252948.png

 

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

my problem a little different

i want to have slicer, where user can choose all time interval AND the button(not slicer), that open mark where data on diagramms from start of this year up to this day

and when user open the site he mast see data up to this day

i hope i can explain my issue correctly..(

tamerj1
Super User
Super User

Hi @yakovleva_alena 

please provide more details perhaps with some screenshots. 

I have some diagramms with data by month.
I can choose time interval using the button below, but i want to update date automaticly and show that from start of this year up to today.
So my question: how can i write code in DAX for automaticly updating date on button below or maybe on other button every day?

yakovleva_alena_0-1695107612433.png

 

@yakovleva_alena 
Please refr to attached sample file with the solution

1.png2.png3.png

yakovleva_alena_1-1695301515390.pngyakovleva_alena_2-1695301563867.pngyakovleva_alena_3-1695301617010.png

Thank you very much, but it works only on slicer and does not affect on diagramm
I attached some screenshots from your file
maybe you can help me to connect date-filters and diagramms?

@yakovleva_alena 

Check the interaction between the date slicer and the chart

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

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

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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