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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I am working on a sales forecasting report and I am struggling on how to create a measure that would calculate the sum of 'Sales Data' [sales_price] but only for sales that had an order date and invoice date in the current month (MTD).
My table 'Sales Data' has the following fields I need to use:
[sales_price]
[order_date]
[invoice_date]
*also i need this to update with my date slicer that is using another measure 'FullDateKey'. There is a relationship for this measure between the date and the 'sales data'[invoice_date], not the order date.*
Thanks!
Solved! Go to Solution.
Hi @Libbyb23
First of all, measure can't be put into the slicer.You can create a date table using the following formula, and then create a relationship between the date table and the invoice_date column.
FullDateKey = CALENDAR(DATE(2024,1,1),DATE(2024,12,31))
Based on your needs, I have created the following table.
You can calculate total sales using the following Dax:
Measure = SUMX(FILTER('Table','Table'[invoice_date]<>BLANK()&&'Table'[order_date]<>BLANK()),'Table'[sales_price])
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 @Libbyb23
First of all, measure can't be put into the slicer.You can create a date table using the following formula, and then create a relationship between the date table and the invoice_date column.
FullDateKey = CALENDAR(DATE(2024,1,1),DATE(2024,12,31))
Based on your needs, I have created the following table.
You can calculate total sales using the following Dax:
Measure = SUMX(FILTER('Table','Table'[invoice_date]<>BLANK()&&'Table'[order_date]<>BLANK()),'Table'[sales_price])
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 67 | |
| 45 | |
| 41 | |
| 36 | |
| 23 |
| User | Count |
|---|---|
| 191 | |
| 127 | |
| 106 | |
| 78 | |
| 53 |