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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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