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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Alternative Calculated Column

Hi Guys,

I have 2 Datasets, whose sample is provided below

amitkumar93_0-1609772438962.pngamitkumar93_1-1609772459269.png

 

 


i am trying to create a calculated column in table1, looking for Country from Table 2,
if there are multiple values expected, it should return country with earliest  Date

I have created the column with following dax 

Lookup_Country =
Var Date1 = CALCULATE(MIN('Table (2)'[Date]))
Return
CALCULATE(VALUES('Table (2)'[Country]),FILTER('Table (2)','Table (2)'[Email]='Table'[Email] && 'Table (2)'[Date]=Date1))

it is returning correct values as this
 
 

Name   Email      Country
A          Email1    AU
B          Email2    AQ
C          Email3    AW

A          Email4    AD
B          Email5    AS


However my original dataset is much larger and when i am applying this calculated column, i am getting error as

"There isnt enough memory to complete this Operation, please try again later"

 

Is there any other Dax functions i can use to get the above lookup values?
Please suggest

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , create a new column in Table

 

new column =
var _min = minx(filter(Table2,table2[email] =table[email] ), table2[date])
return
minx(filter(Table2,table2[email] =table[email] && Table2[Date]=_min), table2[Country])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Works!!
Thank you @amitchandak  🙂

amitchandak
Super User
Super User

@Anonymous , create a new column in Table

 

new column =
var _min = minx(filter(Table2,table2[email] =table[email] ), table2[date])
return
minx(filter(Table2,table2[email] =table[email] && Table2[Date]=_min), table2[Country])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.