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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Ugo
New Member

Filter

Hi,

I need to determine which are the Route numbers that have an associated Number greater than 50 for 3 successive Dates. In this example, the Route 4, 6 and 7 have Numbers greater than 50 for 3 successive Dates. 
Thanks for your help.

Ugo_0-1627667602879.png

 

 

 

 

 
1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Ugo You are going to want something like Cthulhu or MTBF might also provide a pattern:

Cthulhu - Microsoft Power BI Community

Mean Time Between Failure (MTBF) - Microsoft Power BI Community

 

Both are for doing row-wise comparison operations (which is not trivial in DAX)


@ 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...

View solution in original post

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@Ugo 


Seems route 11 is also has 3 values greater than 50. For your requirement, you could first create a flag column then create a result column.

 

flag column = IF([Number]>50,1)
 
Result =
var _count= CALCULATE(SUM([flag column]),FILTER('Table',[Route]=EARLIER('Table'[Route])))
Return IF(_count=3,'Table'[Route])

 

Vpazhenmsft_0-1627975219361.png

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

 

Thanks for the solution. However, route 11 does not have three consecutive results greater than 50. There is a result of 30 on August 18th.

Greg_Deckler
Super User
Super User

@Ugo You are going to want something like Cthulhu or MTBF might also provide a pattern:

Cthulhu - Microsoft Power BI Community

Mean Time Between Failure (MTBF) - Microsoft Power BI Community

 

Both are for doing row-wise comparison operations (which is not trivial in DAX)


@ 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

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

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.