The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello,
I need Month vs Month comparison based on dates in my table (not based on "today()"). Table is auto updated twice a month so what I need is to compare latest month in data with previous month e.g. if today is 2019/05/23 and the latest date aviable in data is 2019/04/12, then compare april with march.
MvM% = VAR CYear = YEAR(LASTDATE(SOURCE[DATE])) VAR CMonth = MONTH(LASTDATE(SOURCE[DATE])) VAR LMonth = PREVIOUSMONTH(LASTDATE(SOURCE[DATE])) VAR CCMonth = CALCULATE(COUNT(SOURCE[UCET]),FILTER(ALL(SOURCE),MONTH(SOURCE[DATE])=CMonth)) VAR CLMonth = CALCULATE(COUNT(SOURCE[UCET]),FILTER(SOURCE,IF(CMonth=1,LMonth=12 && YEAR(SOURCE[DATE])=CYear-1,MONTH(SOURCE[DATE]) = LMonth && YEAR(SOURCE[DATE])=CYear))) return DIVIDE(CCMonth-CLMonth,CLMonth,0)
Hi @Anonymous ,
Could you please share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Hi,
Unfortunately, I cannot share my data but you need just 2 columns: first with dates of every day from the start of the year and the second can be just random number because you just count them.
User | Count |
---|---|
69 | |
69 | |
66 | |
54 | |
28 |
User | Count |
---|---|
112 | |
82 | |
66 | |
48 | |
43 |