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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors