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 ...
  • VahidDM's avatar
    4 years ago

    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/