Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to get corresponding column value ?

Hi 

 

Suppose i have one table with date key and week start date and week end date and fiscal week number columns .How do i get the fiscal week number for today ?

Can someone help me with the dax please 

  • Hi Anonymous 

     

    If your table has all dates with our any missed date, try this:

    Measure = 
    Var _D = Today ()
    return
    calculate(max(table[fiscal week number]),filter(all(table),table[date]=_D))


    Otherwise, use this:

    Measure = 
    Var _D = Today ()
    return
    calculate(max(table[fiscal week number]),filter(all(table),table[week start date] <=_D&&table[week end date] >=_D))

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/

     

     

     

3 Replies

  • Anonymous ,

    Maxx(filter('Date','Date'[week start date] <= Today() && 'Date'[week end date] >= Today() ), 'Date'[week number ])

  • Hi Anonymous 

     

    If your table has all dates with our any missed date, try this:

    Measure = 
    Var _D = Today ()
    return
    calculate(max(table[fiscal week number]),filter(all(table),table[date]=_D))


    Otherwise, use this:

    Measure = 
    Var _D = Today ()
    return
    calculate(max(table[fiscal week number]),filter(all(table),table[week start date] <=_D&&table[week end date] >=_D))

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for your help