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.
Hi,
how can I put a condition if a specific value repeats itself continuously (WITHOUT INTERRUPTION) at least 3 times?
I want to see if a cell is ABOVE or equal to 3 at least 3 continuous times:
example:
the yes = the moment when we reach that 3rd time
thank you in advance!
Solved! Go to Solution.
I didn't use your data because I didn't trust the site it took me to but I dummied up some test data and I created 2 custom columns in Power Query:
1st column creates a list of last 3 values. Call the column CustomDF
let i = [Index] in { #"Added Index"[val]{i}, #"Added Index"[val]{i - 1}, #"Added Index"[val]{i - 2}}
2nd column tests the previous column for all values above 2.
List.MatchesAll([CustomDF], each _ > 2)
So if you substitute column names and step names in the above this should work for you.
Please let me know.
If you post the data (not a picture) i'll have a go.
It might not be today but I'll look at it
I didn't use your data because I didn't trust the site it took me to but I dummied up some test data and I created 2 custom columns in Power Query:
1st column creates a list of last 3 values. Call the column CustomDF
let i = [Index] in { #"Added Index"[val]{i}, #"Added Index"[val]{i - 1}, #"Added Index"[val]{i - 2}}
2nd column tests the previous column for all values above 2.
List.MatchesAll([CustomDF], each _ > 2)
So if you substitute column names and step names in the above this should work for you.
Please let me know.
I noticed that the formula doesn't take into account the product number
example:
how can I create unicity between the products?
when a new products appear in the list, the calculation sould start the counting again if you see what I mean?
It works!! expect for the very last cell
Thanks a lot for your help I really appreciate.!!
In Power Query, there isn't a notion of above or below a row. You will have to add an index column to use for order or maybe a solution involving Table.Group with GroupKind.Local.
It might make it simpler if you add a helper column "above 2"
Thank you HotChilli.
I am not familiar with GroupKindLocal, can you please help me ? I have done the index part in the file:
let
Source = Excel.CurrentWorkbook(){[Name="Tableau1"]}[Content],
#"Type modifié" = Table.TransformColumnTypes(Source,{{"Product", type text}, {"val", Int64.Type}}),
#"Index ajouté" = Table.AddIndexColumn(#"Type modifié", "Index", 1, 1, Int64.Type)
in
#"Index ajouté"
appreciate your help
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |