SQLScholar
New Member
- Joined
- Jan 23, 2020
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
I am having trouble getting a measure to work. I have two measures that I am trying to get to work together. The first calculates the maximum value in a column (which will tell me the month #). And then the second measure is supposed to sum a column for all values <= to the maximum month value (that will tell me the current reporting month.) Here are my measures...
This measure returns the # "1"
Current Report Month:=CALCULATE(
MAX(CapitalReportData[PERIOD]),
FILTER(CapitalReportData,CapitalReportData[COST TYPE]="PO")
)
This measure is returning "0"...
YTD Budget:=CALCULATE(
SUM(CapitalReportData[FY BUD]),
FILTER(CapitalReportData,CapitalReportData[PERIOD]<=[Current Report Month])
)
When I re-write the 2nd measure as follows, I get the correct value....
YTD Budget:=CALCULATE(
SUM(CapitalReportData[FY BUD]),
FILTER(CapitalReportData,CapitalReportData[PERIOD]<=1)
)
So my question is, why won't the "YTD Budget" measure return a value when using the "Current Report Month" measure?
Thanks!
This measure returns the # "1"
Current Report Month:=CALCULATE(
MAX(CapitalReportData[PERIOD]),
FILTER(CapitalReportData,CapitalReportData[COST TYPE]="PO")
)
This measure is returning "0"...
YTD Budget:=CALCULATE(
SUM(CapitalReportData[FY BUD]),
FILTER(CapitalReportData,CapitalReportData[PERIOD]<=[Current Report Month])
)
When I re-write the 2nd measure as follows, I get the correct value....
YTD Budget:=CALCULATE(
SUM(CapitalReportData[FY BUD]),
FILTER(CapitalReportData,CapitalReportData[PERIOD]<=1)
)
So my question is, why won't the "YTD Budget" measure return a value when using the "Current Report Month" measure?
Thanks!