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
idaly
Frequent Visitor

Get the latest price of an item based on a calendar table

Hello PBI community, 

 

I've been trying to duplicate a n 'Excel MAXIFS' function in powerbi & I tried some of the responses published in the forum, however, they are not working. Below example shows the "Latest Date" column which I created in excel as MAXIFS(B:B,B2,F2:F10=G2:G10), something like this and now I would like to recreate this inside powerbi. 

 

idaly_0-1677019358954.png

One of the problems is that the 'CaledarDate' column comes from an only calendar table, they don't share the same table. Can you help with this?

2 REPLIES 2
olgad
Super User
Super User

Hi,

Latest Date = Calculate(
    Calculate(max(T[Date 1]),
    Filter(T, T[Date 1]=Max(T[Date 1])))
,All(T[Date 1]))
olgad_0-1677020929582.png

 


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime
idaly
Frequent Visitor

So this returns just the overall latest date which is today 02-21-2023, when i create a new measure the filters that I have in my data don't get passed. I need to somehow do a 'if the item number = item number' then return 'latest date' which is what I'm struggling with, and this item number is store in it's own table 'Item'[Item Number]. I wanted to see if there is a formula to do MAXIFS(Item:Item, Item, CalendarDate = Latest date)

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.