Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi dear,
I would like some help to create a calculated column. This calculated column checks if the value in the "Rule_rank" column is "Rank". If so, it verifies if there are previous records where the specified conditions (Searched = 367 and Code = A ) are met. If these conditions are met, it returns "OK"; otherwise, it returns blank.
Timestamp | Device | Index | Searched | Code | Rule_rank | Calculated Column |
21/03/2024 18:42:00 | A1 | 219 | 390 | A | Others | |
21/03/2024 18:42:00 | A1 | 219 | 367 | A | Others | OK |
21/03/2024 18:42:00 | A1 | 219 | 391 | A | Others | |
21/03/2024 18:43:00 | A1 | 220 | 367 | A | Others | OK |
21/03/2024 18:43:00 | A1 | 220 | 391 | A | Others | |
21/03/2024 18:43:00 | A1 | 220 | 390 | A | Others | |
21/03/2024 18:44:00 | A1 | 221 | 367 | A | Others | OK |
21/03/2024 18:44:00 | A1 | 221 | 391 | A | Others | |
21/03/2024 18:44:00 | A1 | 221 | 390 | A | Others | |
21/03/2024 18:45:00 | A1 | 222 | Rank | |||
21/03/2024 18:49:00 | A1 | 223 | Others | |||
21/03/2024 18:53:00 | A1 | 224 | Others | |||
21/03/2024 22:45:00 | A1 | 328 | 12 | A | Others | |
21/03/2024 22:46:00 | A1 | 329 | 12 | A | Others | |
21/03/2024 22:46:00 | A1 | 329 | 367 | A | Others | |
21/03/2024 22:47:00 | A1 | 330 | 367 | A | Others | |
21/03/2024 22:47:00 | A1 | 330 | 12 | A | Others | |
21/03/2024 22:48:00 | A1 | 331 | 367 | A | Others | |
21/03/2024 22:48:00 | A1 | 331 | 12 | A | Others | |
21/03/2024 22:49:00 | A1 | 332 | Others | |||
21/03/2024 22:53:00 | A1 | 333 | Others |
Solved! Go to Solution.
Hi @leandross89 ,
Thanks to @Ahmedx for the reply, please allow me to provide another insight:
1. Create a calculated column and populate the data in groups.
Column =
CALCULATE(MIN('Table'[Index]),FILTER(ALL('Table'),'Table'[Rule_rank] = "Rank" && 'Table'[Index] >= EARLIER('Table'[Index])) )
2. Create a calculated column and display OK if it meets the conditions.
Column 2 =
IF('Table'[Index] < 'Table'[Column] && 'Table'[Searched] = 367 && 'Table'[Code] = "A" ,"OK")
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @leandross89 ,
Thanks to @Ahmedx for the reply, please allow me to provide another insight:
1. Create a calculated column and populate the data in groups.
Column =
CALCULATE(MIN('Table'[Index]),FILTER(ALL('Table'),'Table'[Rule_rank] = "Rank" && 'Table'[Index] >= EARLIER('Table'[Index])) )
2. Create a calculated column and display OK if it meets the conditions.
Column 2 =
IF('Table'[Index] < 'Table'[Column] && 'Table'[Searched] = 367 && 'Table'[Code] = "A" ,"OK")
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You created a column called flag, and then, used the function fill up to complete with the value 10 the rows that have code A, It doesn´t works in my case because I have others rows in my index above this period presented.
post an example so I can help you
User | Count |
---|---|
75 | |
75 | |
45 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |