Forum Discussion

sameergupta60's avatar
sameergupta60
Helper IV
5 years ago
Solved

Need help

Hi all,

 

I need some help on the below Dax

 

Maxdate =
CALCULATE (
MAX ( S1[Finish] ),
ALLEXCEPT ( s1, S1[Towers] ),
TREATAS ( VALUES ( 'S1'[trade]), S1[Trade] )
)
 
above dax I have created the column & sample data picture attached below.
 
my query is trade column 02 BW which finish date max will R17 levels finish date.
but with the above Dax which I created getting the max value of trade 10 LFL  finish date max for all.
 
I want max finish value against trade with last levels
 
TradeLevelsTowersFinishMaxdate
07 FLR17B1 (3P+17)05-10-2104-12-2021
05 WPR17B1 (3P+17)04-01-2104-12-2021
06 PBR17B1 (3P+17)14-01-2104-12-2021
03 IPR17B1 (3P+17)15-12-2004-12-2021
04 BRR17B1 (3P+17)30-12-2004-12-2021
09 ELR17B1 (3P+17)04-12-2104-12-2021
12 1PR17B1 (3P+17)02-11-2104-12-2021
08 DOR17B1 (3P+17)16-11-2104-12-2021
02 BWR17B1 (3P+17)12-10-2004-12-2021

 

Regards,

Sameer 

 

  • Please clarify.  The 10 LFL you mention is not in the sample data provided.  If you want to find the max date for the same Trade as well, did you try this expression?

     

    Maxdate =
    CALCULATE (
    MAX ( S1[Finish] ),
    ALLEXCEPT ( s1, S1[Towers], S1[Trade] )
    )
     
    Regards,
    Pat

3 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Please clarify.  The 10 LFL you mention is not in the sample data provided.  If you want to find the max date for the same Trade as well, did you try this expression?

     

    Maxdate =
    CALCULATE (
    MAX ( S1[Finish] ),
    ALLEXCEPT ( s1, S1[Towers], S1[Trade] )
    )
     
    Regards,
    Pat
    • sameergupta60's avatar
      sameergupta60
      Helper IV

      Hi,

       

      it is 09 EL

       

      the provided expression does not show value on that column.

       

       

    • sameergupta60's avatar
      sameergupta60
      Helper IV

      Please ignore the earlier mail solution which provided is working.

       

      thanks for the help