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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Inventrius
New Member

Count days without change in a string per order

Hi,

 

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:

Inventrius_0-1696794102361.png

 

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. 

 

Cheers,

Inventrius

 

1 REPLY 1
Greg_Deckler
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



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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