Forum Discussion

LUCASM's avatar
LUCASM
Icon for Helper IV rankHelper IV
1 year ago
Solved

PLACEHOLDER issue with measure in formula

I have a measure where I am trying to calculate the ASP for some products over a rolling 3 month period This part works  However I have now been asked to reduce the selected products only to includ...
  • LUCASM's avatar
    1 year ago

    If I add  _ASP to my dataset before it gets into my report, I can then use it as a filter like this

     

    Avg_ASP_Rolling_3_months =
    
    VAR XMonths = EDATE([Latest Period], -2)
    
    VAR My_Products = CALCULATE ( 
    DIVIDE ( SUM( [Sales Value EUR] ), Sum ( [Sales Units] ) ), 
    Table1[Model Type] = "A", 
    Table1[Cal_Date] >= XMonths, 
    Table1[_ASP] < 200 )
    
    RETURN My_Products

     

    Not sure what the implications of doing this are, but it works