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
I am trying to track user count totals over time, but I only have each time an account's user count changed, not what the running total is. I need to be able to transform the following table out into the example. My date range is Jan-1-2022 through Dec-1-2023. You'll notice that an accounts user count shows 0 until the first change occurs. After that, the previous month's count carries forward until there is a change.
I need to go from this:
| Account ID | User Count | Date |
| 123 | 505 | 6/1/2022 |
| 123 | 420 | 7/1/2022 |
| 123 | 470 | 9/1/2022 |
| 123 | 500 | 11/1/2022 |
| 123 | 600 | 1/1/2023 |
| 123 | 800 | 2/1/2023 |
| 456 | 21 | 2/1/2023 |
| 456 | 30 | 5/1/2023 |
| 456 | 25 | 6/1/2023 |
| 789 | 13 | 12/1/2022 |
| 789 | 15 | 12/1/2023 |
To this:
| Account | User Count | Date |
| 123 | 0 | 1/1/2022 |
| 123 | 0 | 2/1/2022 |
| 123 | 0 | 3/1/2022 |
| 123 | 0 | 4/1/2022 |
| 123 | 0 | 5/1/2022 |
| 123 | 505 | 6/1/2022 |
| 123 | 420 | 7/1/2022 |
| 123 | 420 | 8/1/2022 |
| 123 | 470 | 9/1/2022 |
| 123 | 470 | 10/1/2022 |
| 123 | 500 | 11/1/2022 |
| 123 | 500 | 12/1/2022 |
| 123 | 600 | 1/1/2023 |
| 123 | 800 | 2/1/2023 |
| 123 | 800 | 3/1/2023 |
| 123 | 800 | 4/1/2023 |
| 123 | 800 | 5/1/2023 |
| 123 | 800 | 6/1/2023 |
| 123 | 800 | 7/1/2023 |
| 123 | 800 | 8/1/2023 |
| 123 | 800 | 9/1/2023 |
| 123 | 800 | 10/1/2023 |
| 123 | 800 | 11/1/2023 |
| 123 | 800 | 12/1/2023 |
| 456 | 0 | 1/1/2022 |
| 456 | 0 | 2/1/2022 |
| 456 | 0 | 3/1/2022 |
| 456 | 0 | 4/1/2022 |
| 456 | 0 | 5/1/2022 |
| 456 | 0 | 6/1/2022 |
| 456 | 0 | 7/1/2022 |
| 456 | 0 | 8/1/2022 |
| 456 | 0 | 9/1/2022 |
| 456 | 0 | 10/1/2022 |
| 456 | 0 | 11/1/2022 |
| 456 | 0 | 12/1/2022 |
| 456 | 0 | 1/1/2023 |
| 456 | 21 | 2/1/2023 |
| 456 | 21 | 3/1/2023 |
| 456 | 21 | 4/1/2023 |
| 456 | 30 | 5/1/2023 |
| 456 | 25 | 6/1/2023 |
| 456 | 25 | 7/1/2023 |
| 456 | 25 | 8/1/2023 |
| 456 | 25 | 9/1/2023 |
| 456 | 25 | 10/1/2023 |
| 456 | 25 | 11/1/2023 |
| 456 | 25 | 12/1/2023 |
| 789 | 0 | 1/1/2022 |
| 789 | 0 | 2/1/2022 |
| 789 | 0 | 3/1/2022 |
| 789 | 0 | 4/1/2022 |
| 789 | 0 | 5/1/2022 |
| 789 | 0 | 6/1/2022 |
| 789 | 0 | 7/1/2022 |
| 789 | 0 | 8/1/2022 |
| 789 | 0 | 9/1/2022 |
| 789 | 0 | 10/1/2022 |
| 789 | 0 | 11/1/2022 |
| 789 | 13 | 12/1/2022 |
| 789 | 13 | 1/1/2023 |
| 789 | 13 | 2/1/2023 |
| 789 | 13 | 3/1/2023 |
| 789 | 13 | 4/1/2023 |
| 789 | 13 | 5/1/2023 |
| 789 | 13 | 6/1/2023 |
| 789 | 13 | 7/1/2023 |
| 789 | 13 | 8/1/2023 |
| 789 | 13 | 9/1/2023 |
| 789 | 13 | 10/1/2023 |
| 789 | 13 | 11/1/2023 |
| 789 | 15 | 12/1/2023 |
@kleetus51 see if this video on my channel is helpful:
LASTNONBLANKVALUE and Missing Data - Power BI - YouTube
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.
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 |
|---|---|
| 53 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 73 | |
| 70 | |
| 39 | |
| 34 | |
| 23 |