DAX Formula

Anything related to PowerPivot and DAX Formuale
PowerMaths
Posts: 1
Joined: Sun Oct 22, 2017 7:00 pm

DAX Formula

Postby PowerMaths » Sun Oct 22, 2017 7:27 pm

Dear all,

I try to find a solution regarding my problem below:
I need to have the Max line in the "Texte" column in function of the column criteria below :

- Ste
- Compte
- Type pce
- Date (only with the max date)

The result has to be in my column "TexteMax"

I have created formulas below in columns :

•DateMax :

Code: Select all

=MAXX(FILTER(Data;[Sté]=EARLIER([Sté]));Data[Date])


and in column

•TexteMax :

Code: Select all

=LOOKUPVALUE([Texte];[Date];[DateMax];[Sté];[Sté])


But it doesn't work. As you can see below, the DateMax is wrong and i have an error in the column "TexteMax" which has to be the final result :

DAX2BIS.PNG
DAX2BIS.PNG (90.34 KiB) Viewed 156 times


Thank you in advance for your help

MattAllington
Posts: 884
Joined: Sun May 04, 2014 4:01 pm
Location: Sydney, Australia

Re: DAX Formula

Postby MattAllington » Fri Oct 27, 2017 10:15 am

Do you really need this in a column? How about using a measure? I answered a similar question here just yesterday https://www.mrexcel.com/forum/power-bi/ ... -date.html
Matt Allington is Professional Self Service BI Consultant, Trainer and Author of the book "Learn to Write DAX". You can hire me at http://Exceleratorbi.com.au
http://exceleratorbi.com.au/what-is-power-pivot/
http://xbi.com.au/learndax


Return to “PowerPivot/DAX”

Who is online

Users browsing this forum: No registered users and 1 guest