Forum Discussion
skitzo
9 years agoFrequent Visitor
Solving a date puzzle!
I have 2 tables in PowerBI, "Calendar dim" and "Fact general ledger". I would like to filter the "Fact general ledger" table with a slicer which uses dates from "Calendar dim" table in a way that whe...
- Anonymous9 years ago
Try YEAR(MAX(CalendarTable[Date]))
Anonymous
9 years agoNot applicable
You can achieve this by creating a special MEASURE:
1. First, you DO NOT connect your calendar table to the Fact
2. Create a measure:
Special Sum = CALCULATE(SUM(Amount),Filter(Fact,YEAR(Fact[DocumentDate])=MAX(YEAR(CalendarTable[Date]))&&Fact[BookingDate]<=Max(CalendarTable[Date])))
Michael
skitzo
9 years agoFrequent Visitor
Hi mshparber,
in the part MAX(YEAR(CalendarTable[Date])) i'm getting an error:
"The MAX function only accepts a column reference as an argument"
Any ideas?
- Anonymous9 years agoNot applicable
Try YEAR(MAX(CalendarTable[Date]))
- skitzo9 years agoFrequent Visitor
That works! Thanks