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
DataGeo
Helper I
Helper I

Using a date slicer with a Card but just showing the last value

I have a date slicer on one page and also a card. The card is numerical data in columnar form which has a date (single day) associate with each day. 

 

With the slicer in a range, it only gives me the options to "sum, average, minimum, etc. etc.".

 

What I want is the LAST value, so only the value for the end range of the slicer. Not sure how to accomplish this.


Thanks!

 

Date and Value column.PNGSlicer.PNG

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

Hi @DataGeo

 

Is this calculated measure what you mean?  My table is called Table, and the two columns are [Date] and [Value]

 

Measure = 
VAR d = LASTDATE('Table'[Date])
RETURN 
    SUMX(
        FILTER(
            'Table',
            'Table'[Date]=d),
            'Table'[Value])

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

3 REPLIES 3
Phil_Seamark
Employee
Employee

Hi @DataGeo

 

Is this calculated measure what you mean?  My table is called Table, and the two columns are [Date] and [Value]

 

Measure = 
VAR d = LASTDATE('Table'[Date])
RETURN 
    SUMX(
        FILTER(
            'Table',
            'Table'[Date]=d),
            'Table'[Value])

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Hi, It works fine if you use the Date column in the same Table, but I'm using a Date hierarchy that is in a Calendar Table and it doesnt work. Can anybody helpme? 

Nailed it! Thank you!

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.