Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I have a fact table that contains all of the columns: StmnUnits, TransDate and StmnDate. I want to sum StmnUnits if the TransDate is before or equal to the last date of the month that is being viewed (via Month & Year slicer) and the StmnDate is after the last day of the month that is being viewed ( Max(Dates[Date]) ). This is my measure formula:
Hi,
- is Dates[Date] connected to the Transactions table? If so, to which field?
- Don't do 2 filters, just combine them
FILTER(
Transactions,
Transactions[TransDate] <= MAX( Dates[Date] &&
Transactions[StmnDate] > MAX(Dates[Date])
)
Hi,
Thank you for your reply. There is an active relationship between Transactions[TransDate] and Dates[Date] and an inactive relationship between Transactions[StmnDate] and Dates[Date].
Ok, when you have this relation between TransDate and Date then you need to write:
VAR MaxSelectedDate = MAX(Dates[Date])
FILTER(
ALLSELECTED(Transactions),
Transactions[TransDate] <= MaxSelectedDate &&
Transactions[StmnDate] > MaxSelectedDate)
)
User | Count |
---|---|
11 | |
9 | |
6 | |
5 | |
4 |