Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Return Most Recent and Second Most Recent Values By Item
03-14-2018
08:55 AM
Hello All -- New Power Bi user here and training in the coming weeks. I was tasked with the following but all attempts so far have not worked. I've tried using a combination of Column formulas, measure formulas, and table formulas with no success. Where do I go from here?
I am attempting to return in my report values for the most recent submission as well as the second to last submission by Item. See screenshot. Any help is much appreciated!
Solved! Go to Solution.
2 ACCEPTED SOLUTIONS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2018
11:11 AM
Please try these MEASURES for current date and price
DateCurrent = MAX ( Table1[Date] )
PriceCurrent = VAR CurrentDate = [DateCurrent] RETURN CALCULATE ( SUM ( Table1[Price] ), Table1[Date] = CurrentDate )
Regards
Zubair
Please try my custom visuals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2018
11:13 AM
And try these MEASURE for Previousdate and PreviousPrice
DatePrevious = VAR currentdate = [DateCurrent] RETURN CALCULATE ( MAX ( Table1[Date] ), Table1[Date] < currentdate )
PricePrevious = VAR PreviouDate = [DatePrevious] RETURN CALCULATE ( SUM ( Table1[Price] ), Table1[Date] = PreviouDate )
Regards
Zubair
Please try my custom visuals
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2018
11:11 AM
Please try these MEASURES for current date and price
DateCurrent = MAX ( Table1[Date] )
PriceCurrent = VAR CurrentDate = [DateCurrent] RETURN CALCULATE ( SUM ( Table1[Price] ), Table1[Date] = CurrentDate )
Regards
Zubair
Please try my custom visuals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2018
11:13 AM
And try these MEASURE for Previousdate and PreviousPrice
DatePrevious = VAR currentdate = [DateCurrent] RETURN CALCULATE ( MAX ( Table1[Date] ), Table1[Date] < currentdate )
PricePrevious = VAR PreviouDate = [DatePrevious] RETURN CALCULATE ( SUM ( Table1[Price] ), Table1[Date] = PreviouDate )
Regards
Zubair
Please try my custom visuals

Helpful resources
Recommendations
Subject | Author | Posted | |
---|---|---|---|
05-01-2024 01:27 AM | |||
08-28-2024 09:43 AM | |||
01-05-2024 07:06 AM | |||
05-28-2019 03:09 AM | |||
Anonymous
| 07-12-2023 05:18 PM |
Featured Topics