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 all,
I am trying to create a DAX measure to use in a card visual that will show the month over month change where type = customer
For this example I need to grab the 1/31/2021 value for type = customer (20) and subtract the 12/31/2020 value for type = customer (1317). I tried using the Prevmonth function but its not giving me the correct value. What would be the best approach to solve this?
The data looks like this:
| date | ID | Type | Value |
| 2/1/2021 | 1 | customer | 10 |
| 2/1/2021 | 1 | internal | 15 |
| 1/31/2021 | 1 | customer | 20 |
| 1/31/2021 | 1 | internal | 56 |
| 1/29/2021 | 1 | customer | 96 |
| 1/29/2021 | 1 | internal | 103 |
| 1/28/2021 | 1 | customer | 125 |
| 1/28/2021 | 1 | internal | 146 |
| 1/27/2021 | 1 | customer | 167 |
| 1/27/2021 | 1 | internal | 189 |
| 1/26/2021 | 1 | customer | 210 |
| 1/26/2021 | 1 | internal | 231 |
| 1/25/2021 | 1 | customer | 252 |
| 1/25/2021 | 1 | internal | 274 |
| 1/24/2021 | 1 | customer | 295 |
| 1/24/2021 | 1 | internal | 316 |
| 1/23/2021 | 1 | customer | 338 |
| 1/23/2021 | 1 | internal | 359 |
| 1/22/2021 | 1 | customer | 380 |
| 1/22/2021 | 1 | internal | 402 |
| 1/21/2021 | 1 | customer | 423 |
| 1/21/2021 | 1 | internal | 444 |
| 1/20/2021 | 1 | customer | 465 |
| 1/20/2021 | 1 | internal | 487 |
| 1/19/2021 | 1 | customer | 508 |
| 1/19/2021 | 1 | internal | 529 |
| 1/18/2021 | 1 | customer | 551 |
| 1/18/2021 | 1 | internal | 572 |
| 1/17/2021 | 1 | customer | 593 |
| 1/17/2021 | 1 | internal | 615 |
| 1/16/2021 | 1 | customer | 636 |
| 1/16/2021 | 1 | internal | 657 |
| 1/15/2021 | 1 | customer | 678 |
| 1/15/2021 | 1 | internal | 700 |
| 1/14/2021 | 1 | customer | 721 |
| 1/14/2021 | 1 | internal | 742 |
| 1/13/2021 | 1 | customer | 764 |
| 1/13/2021 | 1 | internal | 785 |
| 1/12/2021 | 1 | customer | 806 |
| 1/12/2021 | 1 | internal | 828 |
| 1/11/2021 | 1 | customer | 849 |
| 1/11/2021 | 1 | internal | 870 |
| 1/10/2021 | 1 | customer | 891 |
| 1/10/2021 | 1 | internal | 913 |
| 1/9/2021 | 1 | customer | 934 |
| 1/9/2021 | 1 | internal | 955 |
| 1/8/2021 | 1 | customer | 977 |
| 1/8/2021 | 1 | internal | 998 |
| 1/7/2021 | 1 | customer | 1019 |
| 1/7/2021 | 1 | internal | 1041 |
| 1/6/2021 | 1 | customer | 1062 |
| 1/6/2021 | 1 | internal | 1083 |
| 1/5/2021 | 1 | customer | 1104 |
| 1/5/2021 | 1 | internal | 1126 |
| 1/4/2021 | 1 | customer | 1147 |
| 1/4/2021 | 1 | internal | 1168 |
| 1/3/2021 | 1 | customer | 1190 |
| 1/3/2021 | 1 | internal | 1211 |
| 1/2/2021 | 1 | customer | 1232 |
| 1/2/2021 | 1 | internal | 1254 |
| 1/1/2021 | 1 | customer | 1275 |
| 1/1/2021 | 1 | internal | 1296 |
| 12/31/2020 | 1 | customer | 1317 |
| 12/31/2020 | 1 | internal | 1339 |
Thank you!
Solved! Go to Solution.
@FatBlackCat30 solution attached, I added multiple measures to understand the solution. You can tweak it as you see fit.
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@FatBlackCat30 glad it worked out, unfortunately, you marked your own reply as a solution. It doesn't matter but better you mark the actual reply as a solution so that others can take benefit from this solution. Just advice.
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@FatBlackCat30 solution attached, I added multiple measures to understand the solution. You can tweak it as you see fit.
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
this is perfect thank you very much
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |