Forum Discussion
gselvag
Helper I
8 years agoPeriod value (month over month change)
Hello gents, I'm new to Power BI and have an issue regarding retreive/calculate period value (month). The datatable looks like this: The column day_balance is ending balance value ...
- 8 years ago
Hi gselvag,
Please try this measure:
Actual Days Period =
VAR __PREV_MONTH =
CALCULATE (
[Actual Days],
FILTER (
ALLEXCEPT ( Table1, Table1[emp_no] ),
Table1[period].[Year] = YEAR ( MAX ( Table1[period] ) )
&& Table1[period].[MonthNo]
= MONTH ( MAX ( Table1[period] ) ) - 1
)
)
RETURN
IF ( ISBLANK ( [Actual Days] ), BLANK (), [Actual Days] - __PREV_MONTH )Best regards,
Yuliana Gu
v-yulgu-msft
Microsoft Employee
8 years agoHi gselvag,
Please try this measure:
Actual Days Period =
VAR __PREV_MONTH =
CALCULATE (
[Actual Days],
FILTER (
ALLEXCEPT ( Table1, Table1[emp_no] ),
Table1[period].[Year] = YEAR ( MAX ( Table1[period] ) )
&& Table1[period].[MonthNo]
= MONTH ( MAX ( Table1[period] ) ) - 1
)
)
RETURN
IF ( ISBLANK ( [Actual Days] ), BLANK (), [Actual Days] - __PREV_MONTH )
Best regards,
Yuliana Gu
gselvag
Helper I
8 years agoYour measure work like a charm!
Thank You Yuliana