Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Record Growth for QA - in Power BI

I am looking for help in understanding the total unique record count, by day for each day.   I think this falls into a category of "slowly changing dimensions", but each day my record count should grow.

 

This is a function of understanding the how many unique records were in the database on any given date, or between dates or over time.

 

For instance, if I gave a person one jellybean for the the first 6 days of a week, but on Day 7 I gave him two.  The data would show "8 Jellybeans" on Day 7, and when trended it would show the following.

 

Day 1 - 1

Day 2 - 2

Day 3 - 3

Day 4 - 4

Day 5 - 5

Day 6 - 6

Day 7-  8

 

Having this data answers questions like:

 

  • How many unique jelly beand did I have on Day 4?  Answer: 4
  • How many uniques jelly beans did I have since the start?  Answer: 8
  • What is my day-over-day growth between days 5 and 7:  Answer: 3

Thanks in advance.

 

1 ACCEPTED SOLUTION
v-xjiin-msft
Solution Sage
Solution Sage

Hi @Anonymous,

 

In your scenario, did you mean cumulative sum?

 

Please refer to following sample:

 

Source table is like:

 

111.PNG

 

Then use RANKX() function to create an order column and based on this order do a cumulative sum in a calculated column:

 

Rank =
RANKX ( 'jelly bean', 'jelly bean'[Day],, ASC, DENSE )


Total beans =
CALCULATE (
    SUM ( 'jelly bean'[Number] ),
    FILTER (
        ALL ( 'jelly bean' ),
        'jelly bean'[Rank] <= EARLIER ( 'jelly bean'[Rank] )
    )
)

222.PNG

 

Thanks,
Xi Jin.

View solution in original post

1 REPLY 1
v-xjiin-msft
Solution Sage
Solution Sage

Hi @Anonymous,

 

In your scenario, did you mean cumulative sum?

 

Please refer to following sample:

 

Source table is like:

 

111.PNG

 

Then use RANKX() function to create an order column and based on this order do a cumulative sum in a calculated column:

 

Rank =
RANKX ( 'jelly bean', 'jelly bean'[Day],, ASC, DENSE )


Total beans =
CALCULATE (
    SUM ( 'jelly bean'[Number] ),
    FILTER (
        ALL ( 'jelly bean' ),
        'jelly bean'[Rank] <= EARLIER ( 'jelly bean'[Rank] )
    )
)

222.PNG

 

Thanks,
Xi Jin.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.