Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Solved! Go to Solution.
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.
Value maxyear measure: =
CALCULATE ( [Value total measure:], 'Year'[Year] = MAX ( 'Year'[Year] ) )
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.
Hi,
Thank you for your message, and please check the below picture and the attached pbix file.
Value 2010 measure: =
CALCULATE ( [Value total measure:], 'Year'[Year] = 2010 )
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.
I figured out how to apply the correct date, that's all that was needed. Thanks again for all of your help!
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.
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.
Thank you so much, that worked like a charm! Happy New Year!
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.
Value maxyear measure: =
CALCULATE ( [Value total measure:], 'Year'[Year] = MAX ( 'Year'[Year] ) )
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.
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.
Value 2010 measure: =
CALCULATE ( [Value total measure:], 'Year'[Year] = 2010 )
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.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
112 | |
105 | |
98 | |
39 | |
30 |