Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |