The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi everyone,
I've been troubleshooting this issue for a couple hours now to no avail. Let's say I have the following dataset:
Group | Date | Setting |
A | 1/30/23 | 5.3 |
A | 1/15/23 | 5.3 |
A | 1/5/23 | 4.7 |
B | 1/30/23 | 3.2 |
B | 1/29/23 | 2.7 |
B | 1/7/23 | 2.4 |
C | 1/28/23 | 6.1 |
C | 1/17/23 | 6.1 |
C | 1/1/23 | 5.2 |
I want to know the date of the most recent value change in this form:
Group | Most Recent Setting | Date of Last Change |
A | 5.3 | 1/15/23 |
B | 3.2 | 1/30/23 |
C | 6.1 | 1/17/23 |
I have tried a few variations of this as a Calculated Column:
Date of Last Change =
VAR _Setting = SUM( Table[Setting] )
VAR _Date = Table[Date]
RETURN
CALCULATE(
MAX( Table[Date] ),
ALLEXCEPT( Table, Table[Group] ),
Table[Date] < _Date,
SUM( Table[Setting] ) <> _Setting
)
This usually gives me the "The true/false expression does not specify a column" error. I was able to get past this by replacing the commas with &&, but end up with blanks for the whole column.
Thanks in advance for the help!
Q
Solved! Go to Solution.
hi @TheQ
try like:
hi @TheQ
try like:
Thanks @FreemanZ ! That amazingly worked. Do you have any idea why this worked and my original method didn't? I've used my original method successfully on a similar case but where the "Setting" wasn't a number, but a "Passed"/"Failed" column.
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |