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
KH11NDR
Helper IV
Helper IV

Is this possible?

Hi Guys,

 

Is this possible ......

 

With the date slicer, it shows my figures as it should when I have one date selected, when I select two dates, it adds the values together, is there a way that if you do select two dates, or 3 or 4 etc, it only shows me the values of most recent date.  

 

Thanks

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @KH11NDR

there is a way that if you do select two dates, or 3 or 4 etc, it only shows me the values of most recent date.

Create a measure to define today

today = TODAY()

Then create a calculated column to calculate how many days away from today

days from today = ABS(DATEDIFF(Sheet1[date],[today],DAY))

next create measures to find the  most recent date (away from today) based on the selected values with the slicer.

most recent day = CALCULATE(MIN([days from today]),ALLSELECTED(Sheet1))
flag = IF([most recent day]=MAX([days from today]),1,0)

Finally, add "flag" measure to the Visual Level filter, then set "show value when item" is 1.

1.png

 

Best Regards

Maggie

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @KH11NDR

there is a way that if you do select two dates, or 3 or 4 etc, it only shows me the values of most recent date.

Create a measure to define today

today = TODAY()

Then create a calculated column to calculate how many days away from today

days from today = ABS(DATEDIFF(Sheet1[date],[today],DAY))

next create measures to find the  most recent date (away from today) based on the selected values with the slicer.

most recent day = CALCULATE(MIN([days from today]),ALLSELECTED(Sheet1))
flag = IF([most recent day]=MAX([days from today]),1,0)

Finally, add "flag" measure to the Visual Level filter, then set "show value when item" is 1.

1.png

 

Best Regards

Maggie

Chihiro
Solution Sage
Solution Sage

Sure, it's possible. You'll have to filter measure for [Date]=MAX([Date]).

Greg_Deckler
Community Champion
Community Champion

Possible, you would add a VAR __mostrecent = MAX('Table'[Date]) and then use that to decide whether to show something or not. Difficult to say though with the information provided. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.