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.
Hi,
Im new to DAX and Im having trouble using the calculate formula to filter dates. This is what i did:
1. Found the beginning of the latest month using this formula:
bMonth:=EOMONTH ( MAX ( fTransactions[Emision] ), -1 ) + 1
2. Use calculate function to filter everything after that date:
CALCULATE ( [Units], FILTER ( dDate, dDate[Date] >= [bMonth] ) )
I know the error is in step 1 because if I replace [bMonth] for the DATE formula, the filter works fine.
I dont understand what im doing wrong, can somenone please help?
Solved! Go to Solution.
Well... aparently I just solved this by joining step one and two togehter:
CALCULATE ( [Units], FILTER ( dDate, dDate[Date] >= EOMONTH ( MAX ( fTransactions[Emision] ), -1 ) + 1 ) )
I dont know why that makes a difference but there it is.
Well... aparently I just solved this by joining step one and two togehter:
CALCULATE ( [Units], FILTER ( dDate, dDate[Date] >= EOMONTH ( MAX ( fTransactions[Emision] ), -1 ) + 1 ) )
I dont know why that makes a difference but there it is.
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 |
---|---|
44 | |
25 | |
19 | |
16 | |
8 |
User | Count |
---|---|
70 | |
49 | |
45 | |
20 | |
16 |