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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
sverderame
Helper I
Helper I

Obtaining a row value when using "Less than or equal too slicer (Year)

Obtaining a single row value when using "Less than or equal too slicer (Year)

 

I have a table that has 32 rows oy yearly values (year 2000 - 2032), each row has a widget value for its associated year. I am using a few kpi visuals that are working great with this slicer. 

 

Using the CARD visual.

 

When I move the slider to the year 2015 (essentially 2000 - 2015) the value returned on the CARD is the summation of each row value from 2000 - 2015, which is logical. 

 

What I'd like to know is... Is there a way to return the value of the max year of the slider slicer. example from above is that I would like to just return the value of the year 2015 in the CARD.

 

Thank you.

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi,

I do not know how your data model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your data model.

Jihwan_Kim_0-1672541261414.png

 

Jihwan_Kim_1-1672541397133.png

 

 

Value maxyear measure: =
CALCULATE ( [Value total measure:], 'Year'[Year] = MAX ( 'Year'[Year] ) )


Microsoft MVP



If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.




LinkedInVisit my LinkedIn page




Outlook BookingSchedule a short Teams meeting to discuss your question





View solution in original post

Hi,

Thank you for your message, and please check the below picture and the attached pbix file.

Jihwan_Kim_0-1672566819179.png

 

Value 2010 measure: = 
CALCULATE ( [Value total measure:], 'Year'[Year] = 2010 )


Microsoft MVP



If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.




LinkedInVisit my LinkedIn page




Outlook BookingSchedule a short Teams meeting to discuss your question





View solution in original post

7 REPLIES 7
sverderame
Helper I
Helper I

I figured out how to apply the correct date, that's all that was needed. Thanks again for all of your help!

sverderame
Helper I
Helper I

I found where the glitch is. Its becasue I am using a dates table for the slicer, when I select Dates, hierachy, years it does not work. If I select, years on its own, it works perfectly, however, the slicer now, instead of just showing the years shows a month, day, year format that ruins my other visuals.

sverderame
Helper I
Helper I

Hello, for some reason this DAX is not working for me. It applies the correct value from 2010 and higher but when I select 2009, the value turns "Blank"

 

Everything in your files seems to match mine, the relationships seem to be in order. I can't figure out why it is not working when I select a year previous to 2010.

sverderame
Helper I
Helper I

Thank you so much, that worked like a charm! Happy New Year!

Jihwan_Kim
Super User
Super User

Hi,

I do not know how your data model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your data model.

Jihwan_Kim_0-1672541261414.png

 

Jihwan_Kim_1-1672541397133.png

 

 

Value maxyear measure: =
CALCULATE ( [Value total measure:], 'Year'[Year] = MAX ( 'Year'[Year] ) )


Microsoft MVP



If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.




LinkedInVisit my LinkedIn page




Outlook BookingSchedule a short Teams meeting to discuss your question





Hi, I just thought of another scenario I may want to have. I would also like to be able to return the value of say year 2010 (10) regardless of where the year slider is positioned. 

Hi,

Thank you for your message, and please check the below picture and the attached pbix file.

Jihwan_Kim_0-1672566819179.png

 

Value 2010 measure: = 
CALCULATE ( [Value total measure:], 'Year'[Year] = 2010 )


Microsoft MVP



If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.




LinkedInVisit my LinkedIn page




Outlook BookingSchedule a short Teams meeting to discuss your question





Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

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