Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi,
I have a calculated column to get the total amount in a month from last year from a transactional table, to be compared with the MTD figure in the current year in a visual.
The formula applied is
Amount MTD Previous Year. = CALCULATE(SUM('Transation'[Amount]),DATEADD(DATESMTD(DateCalendar[Date]),-12,MONTH))
And I have another table consists of calendar dates from several years period.
I use this calendar date table as an X-axis and filtering month and year.
The screen shot below is the visual I mentioned.
The result given from the previous year MTD from Jan-Nov is correct.
However, the Dec figure shows incorrect result. It's showing the total amount of Jan-Nov.
I need help to show me what is wrong with the formula & how to fix this, so I can get the correct figure to show MTD of each month from the previous year of the year that is selected as filter.
Thanks.
Solved! Go to Solution.
Hi,
Try this measure (not a calculated column formula)
=CALCULATE(SUM('Transation'[Amount]),SAMEPERIODLASTYEAR(DateCalendar[Date]))
Does this work?
Hi,
Try this measure (not a calculated column formula)
=CALCULATE(SUM('Transation'[Amount]),SAMEPERIODLASTYEAR(DateCalendar[Date]))
Does this work?
Hi @Ashish_Mathur,
I got the problem. It's because of the data.
Sorry to bother you.
Thanks anyway. I will keep in mind your suggestion next time.
@RMV,
To help close this thread, you may accept solution. Your contribution is highly appreciated.
You are welcome.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 40 | |
| 36 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 38 | |
| 34 | |
| 23 |