Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

DAX help for Vlookup


HI Experts,

Can I create a vlookup formula using dax based on below conditons
I have a table with ID and Reporting date
And another table with same ID, Status. Raised date and Closure date .

I need to add Status in the first table baed on below two conditions

if Reporting date  >= Raised date  &&
   Reporting date  <= Closure date then I need to show staus.

Please help

  •  

    Anonymous 

    pls try this

     

    Column = maxx(FILTER('Table (2)','Table (2)'[ID]='Table'[ID]&&'Table'[Reporting date]>='Table (2)'[Raised date]&&'Table'[Reporting date]<='Table (2)'[Closure date]),'Table (2)'[Status])

     

     

     the date of 100 does not between the raised date and closure date. So shall we display blank?

     

    pls see the attachment below

     

8 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable
      Project IDReporting dateStatus  
      10001-01-2023Yes  
      10004-01-2023   
      10101-01-2023No  
      10104-01-2023   
           
           
           
      Project IDRaised dateClosure dateStatus 
      10001-01-202315-01-2023Yes 
      10110-01-202215-01-2022No 
      10101-01-202303-01-2023No 

       

      ryan_mayu , please check

      • ryan_mayu's avatar
        ryan_mayu
        Super User

         

        Anonymous 

        pls try this

         

        Column = maxx(FILTER('Table (2)','Table (2)'[ID]='Table'[ID]&&'Table'[Reporting date]>='Table (2)'[Raised date]&&'Table'[Reporting date]<='Table (2)'[Closure date]),'Table (2)'[Status])

         

         

         the date of 100 does not between the raised date and closure date. So shall we display blank?

         

        pls see the attachment below