March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
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:
Thanks in advance.
Solved! Go to Solution.
Hi @Anonymous,
In your scenario, did you mean cumulative sum?
Please refer to following sample:
Source table is like:
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] ) ) )
Thanks,
Xi Jin.
Hi @Anonymous,
In your scenario, did you mean cumulative sum?
Please refer to following sample:
Source table is like:
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] ) ) )
Thanks,
Xi Jin.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
91 | |
90 | |
83 | |
73 | |
49 |
User | Count |
---|---|
167 | |
149 | |
98 | |
73 | |
57 |