Forum Discussion
Filter in a Measure
I have a list of running hours for a piece of equipment for every period/week. I use the following Measure to generate a cummulitive running hour curve:
CummulitiveMHbyPeriod =
SOLUTION FROM ChatCPT in case anyone sees this.
CumulativeMH_EquipA =
CALCULATE(
SUM('Distribution'[Period Values]),
FILTER(
ALLSELECTED('Distribution'[Dates]),
ISONORAFTER('Distribution'[Dates], MAX('Distribution'[Dates]), DESC)
),
'Distribution'[EquipmentType] = "EquipA"
)
2 Replies
- Ritaf1983Super User
Hi Ste4en
Please see the linked discussion :
if your scenario is different
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- Ste4enFrequent Visitor
SOLUTION FROM ChatCPT in case anyone sees this.
CumulativeMH_EquipA =
CALCULATE(
SUM('Distribution'[Period Values]),
FILTER(
ALLSELECTED('Distribution'[Dates]),
ISONORAFTER('Distribution'[Dates], MAX('Distribution'[Dates]), DESC)
),
'Distribution'[EquipmentType] = "EquipA"
)