Forum Discussion

cassidy's avatar
cassidy
Power Participant
5 years ago
Solved

Filter a Measure by a Measure Issue

Hello,   I'm trying to Filter a Measure with another Measure, not sure why I'm getting a blank result   This is the goal Measure, it's Calculating an already established measure and filtering my ...
  • cassidy's avatar
    5 years ago

    I was able to get this to work by defining my PriorPriorMthNumber Measure as a Variable.

     

    So instead of

    DemandPrPrMth = CALCULATE([Demand Sls $],FILTER('Fiscal Calendar','Fiscal Calendar'[FiscalPeriodMonth]= 'Fiscal Calendar'[PriorPriorMthNumber]))

     

    I'm doing

     

    Demand Sls $ PrPr Mth = VAR PrPrMth = [PriorPriorMthNumber]
    RETURN
    CALCULATE([Demand Sls $ TY],FILTER('Fiscal Calendar','Fiscal Calendar'[FiscalPeriodMonth]= PrPrMth)))

     

    Slightly different metrics between the two, but the point is I defined the Measure I wanted to filter by as a Variable first and then filtered on the Variable.  No idea why, I guess the Variable is formatted in a way the query understands.