cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
estamile New Member
New Member

DAX/Calculated Column: Select latest records

Hi Team,

 

Looking for help trying to display the latest set of numbers based on a field that has 3 values - for simplicity, we'll call them First, Second, Final. I need my measure (or calculated column) to select the Final set of numbers, if it doesn't exist the Second, and at worst, the First.  It seems like an If/Else statement - but I can't figure out how to make this one work.

 

First, I created a new column (Settlement Type Number) where my 'First', 'Second', and 'Final' were converted to numbers: 1, 2, 3.

 

Site Desc = the Site Name corresponding to that set of data.

 

New Measure = if(CALCULATE(MAX(TABLE_NAME[Settlement Type Number]),

FILTER(TABLE_NAME, TABLE_NAME[SITE_DESC]=EARLIER(TABLE_NAME[SITE_DESC])))= TABLE_NAME[Settlement Type Number],1,0)
 
This worked for an Microsoft tech helping me out when I gave him a set of data, but it won't work for my table... not sure why.
 
Please help!

 

 

 

1 REPLY 1
Super User IV
Super User IV

Re: DAX/Calculated Column: Select latest records

Hi there

Do you have a sample dataset that you can put into this message?

And what what the expected output should be?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Power BI Blog

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Kudoed Authors