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 trying to count distinct values in a by date and create a new measure that calculates the cumulative sum of the distinct counts as the time period progresses: The table on the left is representative of my data table. The table on the right is what I would like to my counts to look like.
Any help you can provide is appreciated!!
Solved! Go to Solution.
Assuming you have a calendar table
https://exceleratorbi.com.au/power-pivot-calendar-tables/
something like this
Distinct products =DISTINCTCOUNT(data[product])
Running total =CALCULATE(sumx(values(calendar[date]),[Distinct Products]),Filter(All(calendar),calendar[date] <= max(calendar[date])))
use the calendar date column in your visual.
Hi @Anonymous ,
Is this problem solved?
If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If not, please let me know.
Best Regards,
Icey
HI @Anonymous
I used the below to get the running total.
CALCULATE (
SUM ( 'Table'[Count Distinct Product] ),
ALL ( 'Table' ),
'Table'[Date] < EARLIER ( 'Table'[Date] )
)
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
Assuming you have a calendar table
https://exceleratorbi.com.au/power-pivot-calendar-tables/
something like this
Distinct products =DISTINCTCOUNT(data[product])
Running total =CALCULATE(sumx(values(calendar[date]),[Distinct Products]),Filter(All(calendar),calendar[date] <= max(calendar[date])))
use the calendar date column in your visual.
Thank you! This worked.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |