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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

display value for latest month selected in slicer

Hello dear Community, 

 

im have a date slicer, filtering for months. If multipile months are selected, I want to display my column value displayed for the lastest month. 

 

01        0,15

02        0,2

03        0,17

So, if a single month is selected, lets say 02, I want 0,2 to pop up. If all 3 months are selected, I wanna display the value 0,17. 

 

I highly appreciate any help & thanks in advance! 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You could create below measure and put it in a card visual. If no month is selected, it displays blank. 

Display Value = 
VAR _month = MAX('Table'[Month])
RETURN
IF(ISFILTERED('Table'[Month]),CALCULATE(SELECTEDVALUE('Table'[Value]),'Table'[Month]=_month),BLANK())

 060803.jpg

Or if you want to display value of the latest month when no month is selected, you could modify the measure into

Display Value = 
VAR _month = MAX('Table'[Month])
RETURN
CALCULATE(SELECTEDVALUE('Table'[Value]),'Table'[Month]=_month)

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You could create below measure and put it in a card visual. If no month is selected, it displays blank. 

Display Value = 
VAR _month = MAX('Table'[Month])
RETURN
IF(ISFILTERED('Table'[Month]),CALCULATE(SELECTEDVALUE('Table'[Value]),'Table'[Month]=_month),BLANK())

 060803.jpg

Or if you want to display value of the latest month when no month is selected, you could modify the measure into

Display Value = 
VAR _month = MAX('Table'[Month])
RETURN
CALCULATE(SELECTEDVALUE('Table'[Value]),'Table'[Month]=_month)

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

amitchandak
Super User
Super User

@Anonymous , Try a new measure like

 


measure =
var _max = maxx(allselected(Table), Table[month])
return
if(isfiltered(Table[month]), sum(Table[Value]), calculate(sum(Table[Value]), filter(Table, Table[Month] = _max)))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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