Forum Discussion

mejiaks's avatar
mejiaks
Frequent Visitor
7 years ago
Solved

Calculated() with Var and literal filter

Hi   I am struggling with a measure that need to show a sum of orders based on a filter when i specify the filter value with a literal like this   Orders 2018 with Literal = CALCULATE(sum(order...
  • Zubair_Muhammad's avatar
    7 years ago

    mejiaks 

     

    Try this one...We need to take measure out of FILTER function

     

    Orders 2018 with Measure =
    VAR myyear = [Year # 1]
    RETURN
        CALCULATE ( SUM ( orders[qty] ), FILTER ( orders, orders[year] = myyear ) )