Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

How to Dynamically get 13 weeks (FY Week) based on Year selection in Slicer ?

Hi Community,  I have a requirement where i need to show only 13 weeks based on the Year selected in slicer. visuals shown below are part of my requirement.    When i select 2024 in date slicer,  ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Anonymous 
    Hello, you can calculate this by directly creating a measure:

    M_result = 
    VAR FirstDayMAT=
    MIN('DateTable'[Date])
    VAR EndDayMAT=
    FirstDayMAT+(7*13-1) // Date values from the beginning of the selected year (1/1) to the thirteenth week
    RETURN
    CALCULATE(MAX('DateTable'[FY Week]),FILTER(ALLSELECTED(DateTable),'DateTable'[Date]>=FirstDayMAT&& 'DateTable'[Date]<=EndDayMAT))

    like this:

     

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

    Best Regards,

    Carson Jian,

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.