This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi guys,
I would like to calculate sum of "Transportation Charge" by againsted between month and previous month.
However, the result shows only "__TR Cost This Month" while the sum of previous month isn't display by monthly "__TR Cost Last Month".
Remark: in the table, it has the sum total of "__TR Cost Last Month" which is correct result.
Please help me to find out this problem!
Thanks,
Billy.
Hi @PijushRoy
Thank you for suggestion.
The Unit (Adjust) is column.
I've tried to use DATEADD instead of PARALLEPERIOD but result is still the same.
Do you have any other solution?
Thanks
Billy
Hi @Anonymous
Please share the DAX for "_TR Cost This Month"
Try this, confirm that Date is date datatype
_TR Cost Last Month =
VAR _LastMonthSales = CALCULATE(
SUM([Value]),
FILTER('Append1','Append1'[Units (adjust)]="TR Charge"),
DATEADD('Append1'[Date],-1, MONTH)
)
RETURN _LastMonthSales
Let me know if that works for you
If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.
Thanks
Pijush
Linkedin
Proud to be a Super User! | |
Please find the DAX of "_TR Cost This Month" as below
__TR Cost This Month =
CALCULATE(
SUM([Value]),
FILTER('Append1', 'Append1'[Units (adjust)] = "TR Charge")
)
Hi @Anonymous
is Unit (Adjust) measure? Please use column ref for filter
Please create a table and check if there any value for your filter criteria "TR Change"
In place of PARALLELPERIOD can you use DATEADD
Let me know if that works for you
If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.
Thanks
Pijush
Linkedin
Proud to be a Super User! | |
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 23 | |
| 23 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 63 | |
| 38 | |
| 28 | |
| 23 | |
| 22 |