Forum Discussion
Calculate function - filter
- 4 years ago
I don't think the post initiator, so far, wraps his/her head around my solution in another post of his/hers.
Solved: How to reference a value on related table - Microsoft Power BI Community
CALCULATE filters are actually tables.Indeed, this is how filters works in DAX. It's an explicit leveraging of Expanded Table in such statements, CALCULATE( XXX, Table ).
Hi JustinDoh1 what is Table1?
I would think that just DAY(EOMONTH('Calendar'[Date], 0)) would be enough?
- JustinDoh14 years agoPost Prodigy
Table1 is a name of a table.
I am getting error mesage.
Update:
I have updated the Pbix file, and bottom are illustrations of two cases:- littlemojopuppy4 years agoCommunity Champion
JustinDoh1 I assumed it was a table. Whole thing seems unnecessary.
I didn't use ENDOFMONTH. I used EOMONTH (returns the last day of a month with offset by number of months).
- tamerj14 years agoCommunity Champion
As I said in my previous reply, the card here mentions the number of days of the last month available in Table1. If the last month in Table1 is September then you would see 30. But wihout having Table1 in the filter of your code then you would allways see 31 with is the number of days of December.
The error in the other formula is irrelevant. You are placing 0 which means FALSE as a CALCULATE filter table which is not allowed.- littlemojopuppy4 years agoCommunity Champion
tamerj1 if you paid a little bit of attention, you'd notice that JustinDoh1 is a Super User and I'm fairly certain they understand how the CALCULATE function works. You'd also have noticed that what I suggested did not involve the CALCULATE function...simply DAY(EOMONTH('Calendar'[Date], 0)).