Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
i was wondering if it's possible to do a calculation for the following example table, when a certain value continues unchanged, for example, more than 7 days, it would start to count those rows. The measure for the following example should return 36.
Cumulative Total | Date |
5 | 2022/08/15 |
5 | 2022/08/14 |
5 | 2022/08/13 |
5 | 2022/08/12 |
5 | 2022/08/11 |
5 | 2022/08/10 |
5 | 2022/08/09 |
5 | 2022/08/08 |
5 | 2022/08/07 |
5 | 2022/08/06 |
5 | 2022/08/05 |
5 | 2022/08/04 |
5 | 2022/08/03 |
5 | 2022/08/02 |
5 | 2022/08/01 |
5 | 2022/07/31 |
5 | 2022/07/30 |
5 | 2022/07/29 |
5 | 2022/07/28 |
5 | 2022/07/27 |
5 | 2022/07/26 |
5 | 2022/07/25 |
5 | 2022/07/24 |
5 | 2022/07/23 |
5 | 2022/07/22 |
5 | 2022/07/21 |
5 | 2022/07/20 |
5 | 2022/07/19 |
5 | 2022/07/18 |
7 | 2022/07/17 |
7 | 2022/07/16 |
10 | 2022/07/15 |
15 | 2022/07/14 |
20 | 2022/07/13 |
24 | 2022/07/12 |
33 | 2022/07/11 |
33 | 2022/07/10 |
33 | 2022/07/09 |
42 | 2022/07/08 |
5 | 2022/07/07 |
5 | 2022/07/06 |
5 | 2022/07/05 |
5 | 2022/07/04 |
5 | 2022/07/03 |
5 | 2022/07/02 |
5 | 2022/07/01 |
Thank you very much for your help!
Sorry V Confusing explanation
Hi @temuulenchoi ,
I'm sorry I don't seem to understand the logic of your calculation, how did you calculate the "36"? Am I wrong in understanding that when the value is always 5 and has not changed for more than seven days, the total number of rows is counted from the next row?
Best regards,
Community Support Team Selina zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi there @Anonymous ,
what I'm trying to find is to count the rows that contain same values, that are same for 7 or more days consecutively.
For example, if the values between 2022/07/01 and 2022/07/07 (which are 7 consecutive days) stays 5, it would count as 7. But if the value stays for 3 consecutive days and changes by the next date, this will not be counted.
Step 1Turn Cumulative Total to Don't Summarise
Step 2 Get the Count of Dates,
To avoid other values,set the Filter Count of Date as > 7
Thanks,
Ritesh
Sorry this is not the solution. The value 5 was just an example, it can be 30, or even 100. It is the count of rows that continues to be the same for more than a certain amount of days (more than 7 days for example). And the measure should return count of the days
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
27 |
User | Count |
---|---|
92 | |
50 | |
44 | |
40 | |
35 |