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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

New Member

Count days without change in a string per order



I'm quiet new to PowerBi and trying to get a hand of PowerQuery. 


For a dashboard I'd like to make I want to monitor the amount of days that there is no change in a certain value. 

The data looks as following:



I want to create an extra column that indicates the amount of days without change in the string of the Qcode column.

So when using a table PowerBi that I can see per specific order how long there has/hasn't been any change to the Qcode string.

In this case the 8th of September should show 8, but with the 11th it should be 0 again as the string has changed.

Initially I was thinking to make an additional column, stating 1 or 0 if the previous day is the same and then simply sum it in the table. But this will not turn it into zero if there are changes to the string.


No clue where to begin here, but hopefully someone can point me in the right direction. 





Super User
Super User

@Inventrius Can you post the sample data as text? If DAX is an acceptable solution, you could try Cthulu: Cthulhu - Microsoft Fabric Community

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources


Fabric certifications survey

Certification feedback opportunity for the community.


Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors