The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello, everyone!
I'm trying to calculate transactions for the same count of days for previous month.
I have a great formula
Transactions MoM = CALCULATE([Transactions], DATEADD(FILTER(DATESMTD('Calendar'[Calendar day]), 'Calendar'[Calendar day] < TODAY()),-1,MONTH)),
but it's not working correctly on the last day of month (2021-08-31).... I get [Transactions] for full previous month (2021-07-01 - 2021-07-31), but expect [Transactions] for period from 01 to 30 day of month.
How can I fix that?
Correct amount which I expected is 9 642 542, but got 9 935 710.
Solved! Go to Solution.
Change formula to my own -
Change formula to my own -
If I change FILTER(DATESMTD('Calendar'[Calendar day]), 'Calendar'[Calendar day] < TODAY()) to
FILTER(DATESMTD('Calendar'[Calendar day]), 'Calendar'[Calendar day] < TODAY() - 1)
get transactions for 1..29 days correctly 🙂
Magic only if I make FILTER(DATESMTD('Calendar'[Calendar day]), 'Calendar'[Calendar day] < TODAY())
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |