Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
User | Count |
---|---|
17 | |
16 | |
14 | |
13 | |
12 |
User | Count |
---|---|
17 | |
14 | |
12 | |
10 | |
8 |