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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have a production order dataset with past and future dates. I want to calculate the sum of delivered, and sum of ordered quantity for ONLY the dates equal to or prior to the report run date (I want to avoid summing open production orders that are not yet due). I am using a file naming convention with date as integer as the first 8 digits. Example: 20190815_ProductionOrd.xlsx
I created a column with the this formula: Report Date = LEFT('ProdOrd'[Source.Name],8) to return 20190815 on all rows.
I also have a date table (relationship built) with "date as integer" as one of the columns
I'm having trouble writing a formula that will use the MAX('Report Date') in the filter expression. I can't get CALCULATE or FILTER to accept the numeric value MAX('Report Date') which would be 20190815. I keep getting the error - A function 'MAX' has been used in a True/False expression that is used as a table filter expression
FY19 Act = CALCULATE(SUM('ProdOrd'[Delivered quantity (GMEIN)]),'Date'[Date As Integer]<=MAX('ProdOrd'[Report Date]))
Hi @BrentonBarnes ,
In your scenario, you can set a variable to store the result of MAX('Report Date'), then use the variable in the DAX query.
Best Regards,
Teige
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.