Forum Discussion
Guillaume_S
2 years agoFrequent Visitor
Value for previous month without blank
Hi,
I wrote a measure where I want to retrieve the value of the previous month without taking the group into account. However, everything I test takes the group into account. Does someone have an idea ?
My values :
| Date | Group | Value |
| 202401 | A | 10 |
| 202402 | A | 10 |
| 202403 | A | 10 |
| 202404 | B | 15 |
| 202405 | B | 15 |
| 202406 | B | 15 |
| 202407 | B | 20 |
| 202408 | B | 20 |
My measure :
Previous Mth = CALCULATE([Value],PREVIOUSMONTH(Calendar[Date]))
My results :
| Date | Group | Value | Previous Month |
| 202401 | A | 10 | |
| 202402 | A | 10 | 10 |
| 202403 | A | 10 | 10 |
| 202404 | A | 10 | |
| 202404 | B | 15 | |
| 202405 | B | 15 | 15 |
| 202406 | B | 15 | 15 |
| 202407 | B | 20 | 15 |
| 202408 | B | 20 | 20 |
What i looking for ..
| Date | Group | Value | Previous Month |
| 202401 | A | 10 | |
| 202402 | A | 10 | 10 |
| 202403 | A | 10 | 10 |
| 202404 | B | 15 | 10 |
| 202405 | B | 15 | 15 |
| 202406 | B | 15 | 15 |
| 202407 | B | 20 | 15 |
| 202408 | B | 20 | 20 |
Thanks for your help !
Guillaume
If you will use this in only one visual you can leverage from visual calculations and use the PREVIOUS() function from it.
2 Replies
- ray_aramburoSuper User
If you will use this in only one visual you can leverage from visual calculations and use the PREVIOUS() function from it.
- Guillaume_SFrequent Visitor
ray_aramburo Amazing ! thanks