Forum Discussion
Help with measure
- 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 ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
linusb without looking how are the relationship etc , try following
// To select to current week
Selected Week = CALCULATE(MIN(Dates[Weeknum]),
Dates[IsDateHistory] = 0
)
// To calculate remaining Manufacturing time
Available Capacity Inc Past =
CALCULATE([Remaining Manuf Time],
FILTER(ALL(Dates),
Dates[Weeknum] <= [Selected Week]
)
)
or
// To calculate remaining Manufacturing time
Available Capacity Inc Past =
VAR __selectedWeek = CALCULATE(MIN(Dates[Weeknum]),
Dates[IsDateHistory] = 0
)
RETURN
CALCULATE([Remaining Manuf Time],
FILTER(ALL(Dates),
Dates[Weeknum] <= __selectedWeek
)
)
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡