Forum Discussion
calendar calculate Table
Hi
I created a calendar table from the application. When you need to search for values from previous months, using this table the measurement does not work. But if I import a table with dates the formula works without problems
ww
This is an example
| Year | Month | Charges | V_CALENDAR_FUNCTION | V_TABLE_DATE |
| 2018 | January | 806 | 806 | |
| 2018 | February | 1048 | 1048 | 806 |
| 2018 | March | 1113 | 1113 | 1048 |
| 2018 | April | 1237 | 1237 | 1113 |
| 2018 | May | 660 | 660 | 1237 |
| 2018 | June | 2578 | 2578 | 660 |
| 2018 | July | 1182 | 1182 | 2578 |
| 2018 | August | 521 | 521 | 1182 |
| 2018 | September | 416 | 416 | 521 |
| 2018 | October | 576 | 576 | 416 |
| 2018 | November | 914 | 914 | 576 |
| 2018 | December | 1441 | 1441 | 914 |
| 2019 | January | 1441 |
V_CALENDAR_FUNCTION =
uses the calendar table that is created with the dax function CALENDAR(START_DATE, FINISH_DATE).
And V_TABLE_DATE uses the table that was created in excel and then imported into Power BI (
Thank you for your help. I tried in my file (in which you sent me works) does not work the calculation. Then I created a new file and used the function PARALLELPERIOD and there already the data were shown well.
3 Replies
- v-cherch-msft
Microsoft Employee
Hi iabarraganc
You may try below measure.Attached file for your reference.
Last Month = CALCULATE(SUM(Table3[Sales]),DATEADD('Date'[Date],-1,MONTH))Regards,
Cherie
- iabarraganc
Helper I
Thank you for your help. I tried in my file (in which you sent me works) does not work the calculation. Then I created a new file and used the function PARALLELPERIOD and there already the data were shown well.
- v-cherch-msft
Microsoft Employee
Hi iabarraganc
Glad to hear you've solved it, please accept your reply as solution to close this thread.
Regards,
Cherie