Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello everyone,
i´m having an issue with the following excercise.
| Client ID | Status | Month | CONDITION |
| 250 | UNAVAILABLE | abr.-19 | FALSE |
| 250 | UNAVAILABLE | may.-19 | FALSE |
| 250 | OK | jun.-19 | TRUE |
| 250 | OK | jul.-19 | FALSE |
| 250 | WAITING | ago.-19 | FALSE |
| 250 | OK complete | sep.-19 | TRUE |
| 260 | OK | abr.-19 | FALSE |
| 260 | OK | may.-19 | FALSE |
| 260 | OK | jun.-19 | FALSE |
| 260 | UNAVAILABLE | jul.-19 | FALSE |
| 260 | UNAVAILABLE | ago.-19 | FALSE |
| 260 | OK received | sep.-19 | TRUE |
| 270 | OK | abr.-19 | FALSE |
| 270 | OK | may.-19 | FALSE |
| 270 | PENDING | jun.-19 | FALSE |
| 270 | OK done | jul.-19 | TRUE |
| 270 | OK | ago.-19 | FALSE |
| 270 | OK | sep.-19 | FALSE |
I want a calculated column with a true/false statement in which works like this:
if previous month status is anything that doesn´t contains the word "OK" in it AND "actual month contains the word "ok"="TRUE", other than this, "FALSE".
I desire the same results shown in the table above.
This is the link for the data:
https://docs.google.com/spreadsheets/d/1L1rdcxBVGyr60FBRep0XAaeVOYNXX4a35uWNnjkK-Q4/edit?usp=sharing
Thanks for the help in advance!
Solved! Go to Solution.
Hello @hgzelaya
If the Month column is an actual date I was able to get it to work with this.
Condition =
VAR ClientID = 'YourTable'[Client ID]
VAR PMStatus =
CALCULATE (
MAX ( 'YourTable'[Status] ),
ALL ( 'YourTable' ),
'YourTable'[Client ID] = ClientID,
DATEADD ( 'YourTable'[Month], -1, MONTH )
)
VAR CMStatus = 'YourTable'[Status]
RETURN
NOT ISBLANK ( PMStatus )
&& NOT CONTAINSSTRING ( PMStatus, "OK" )
&& CONTAINSSTRING ( CMStatus, "OK" )
Hello @hgzelaya
If the Month column is an actual date I was able to get it to work with this.
Condition =
VAR ClientID = 'YourTable'[Client ID]
VAR PMStatus =
CALCULATE (
MAX ( 'YourTable'[Status] ),
ALL ( 'YourTable' ),
'YourTable'[Client ID] = ClientID,
DATEADD ( 'YourTable'[Month], -1, MONTH )
)
VAR CMStatus = 'YourTable'[Status]
RETURN
NOT ISBLANK ( PMStatus )
&& NOT CONTAINSSTRING ( PMStatus, "OK" )
&& CONTAINSSTRING ( CMStatus, "OK" )
i don´t actually know what you really did right there but, it actually worked! I appreciate it!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 54 | |
| 45 | |
| 38 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 86 | |
| 69 | |
| 38 | |
| 29 | |
| 26 |