Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
Hello everyone,
How can i create a measure to show current month and previous month sale from Northwind Traders dataset
Link download dataset: https://maven-datasets.s3.amazonaws.com/Northwind+Traders/Northwind+Traders.zip
Solved! Go to Solution.
Hi @NQT1711
Please try the following Dax:
Current Month Sales =
CALCULATE (
SUM ( 'Northwind Traders'[Total_sale] ),
FILTER (
ALL ( 'Northwind Traders' ),
MONTH ( 'Northwind Traders'[Date] )
= MONTH ( SELECTEDVALUE ( 'Northwind Traders'[Date] ) )
)
)
Last Month Sales =
VAR current_month =
MONTH ( SELECTEDVALUE ( 'Northwind Traders'[Date] ) )
RETURN
CALCULATE (
SUM ( 'Northwind Traders'[Total_sale] ),
FILTER (
ALL ( 'Northwind Traders' ),
MONTH ( 'Northwind Traders'[Date] ) = current_month - 1
)
)
Result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @NQT1711
Please try the following Dax:
Current Month Sales =
CALCULATE (
SUM ( 'Northwind Traders'[Total_sale] ),
FILTER (
ALL ( 'Northwind Traders' ),
MONTH ( 'Northwind Traders'[Date] )
= MONTH ( SELECTEDVALUE ( 'Northwind Traders'[Date] ) )
)
)
Last Month Sales =
VAR current_month =
MONTH ( SELECTEDVALUE ( 'Northwind Traders'[Date] ) )
RETURN
CALCULATE (
SUM ( 'Northwind Traders'[Total_sale] ),
FILTER (
ALL ( 'Northwind Traders' ),
MONTH ( 'Northwind Traders'[Date] ) = current_month - 1
)
)
Result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 14 | |
| 11 | |
| 9 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 28 | |
| 20 | |
| 19 | |
| 17 | |
| 12 |