Forum Discussion
GSPBI
4 years agoFrequent Visitor
Calculated Column - Show Last Week's Data in Current Week
Dear Microsoft PowerBI community, I have been a long time user of this forum and I really appreciate all the users that raised their queries and the those that respond to them. I have come acr...
- 4 years ago
Hi GSPBI, this seems to work:
No. Activities Planned =
VAR PublicationNumber = 'Table'[Publication Number]
VAR PreviousPublicationNumber =
CALCULATE(
Max('Table'[Publication Number])
, ALLEXCEPT('Table','Table'[Id])
, ('Table'[Publication Number] < PublicationNumber)
)
RETURN
CALCULATE(
MAX('Table'[Planned])
, ALLEXCEPT('Table', 'Table'[Id])
, 'Table'[Publication Number] = PreviousPublicationNumber
)
Russell-PBI
4 years agoResolver II
Hi GSPBI, this seems to work:
No. Activities Planned =
VAR PublicationNumber = 'Table'[Publication Number]
VAR PreviousPublicationNumber =
CALCULATE(
Max('Table'[Publication Number])
, ALLEXCEPT('Table','Table'[Id])
, ('Table'[Publication Number] < PublicationNumber)
)
RETURN
CALCULATE(
MAX('Table'[Planned])
, ALLEXCEPT('Table', 'Table'[Id])
, 'Table'[Publication Number] = PreviousPublicationNumber
)