Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |