Forum Discussion
cassidy
5 years agoPower Participant
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 ...
- 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.
cassidy
5 years agoPower Participant
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.