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 fellows,
im trying to calculate Month to month expenses change in my dataset, which inculdes one whole year data of expenses for different categories on different dates.
i tried finding previous month expenses using below formula, so that i can finally find month to month change.
BUT im making mistake somehwere.
@xifeng_L hello, thankyou, i created new date table for slicer, and used this measure:
Need more info to judge, can you provide the pbix file?
Hi @dilbagsidhu
It looks like you are using the fact table in the PREVIOUSMONTH function? And it should be the same table as the slicer, right?
Since the slicer selects May, then the PREVIOUSMONTH function returns the date of the previous month, but since the slicer restricts the month to May, the intersection of the two will be null, leading to a null final result.
You should create a date table and use the dates from the date table in the PREVIOUSMONTH function. But if you want to keep using the fact table that's fine, just remove the month filter of slicer. You can try below measure.
Previous month =
CALCULATE (
[Total],
PREVIOUSMONTH ( '2024'[Date] ),
ALL ( '2024'[Month Field of Slicer] )
)
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
10 | |
10 | |
10 | |
9 |