Forum Discussion

linusb's avatar
linusb
Frequent Visitor
6 years ago
Solved

Help with measure

Hello, I'm new to PowerBI and I'm trying to get a measure working that looks at what WeekNum is selected, and from that calculates the available capacity.   I've created 2 measures. // To select ...
  • v-lionel-msft's avatar
    v-lionel-msft
    6 years ago

    Hi linusb ,

     

    Maybe you can do like this.

    Create  a calculated column like this and use hierarchical slicer.

     

    Mark the current weeknum = 
    VAR x = WEEKNUM( TODAY(), 2 )
    RETURN
    IF(
        x = [Weeknum],
        "Current weeknum",
        "Other weeknum"
    )

     

    After you set the default option of the slicer, as the data is updated, the default option of the slicer is always the current week number.

     

    Best regards,
    Lionel Chen

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