Forum Discussion
Check if previous value is the same or different - Comparing data across dates
- 2 years ago
Please check it this is the output that you're looking for:
The Measure I'm using is this:New Hardware Swap = VAR _SerialNumber = SELECTEDVALUE(FieldReplaceableUnit_productData[f_serialNumber]) VAR _MaxDate = CALCULATE( MAX(FieldReplaceableUnit_productData[Date created]), FILTER( //ALL(FieldReplaceableUnit_productData), ALLEXCEPT(FieldReplaceableUnit_productData, FieldReplaceableUnit_productData[f_managedElementId], FieldReplaceableUnit_productData[f_fieldReplaceableUnitId]), FieldReplaceableUnit_productData[Date created] < MIN(FieldReplaceableUnit_productData[Date created]) ) ) VAR _Calculation = CALCULATE( VALUES(FieldReplaceableUnit_productData[f_serialNumber]), FILTER( ALL(FieldReplaceableUnit_productData), FieldReplaceableUnit_productData[Date created] = _MaxDate && (FieldReplaceableUnit_productData[f_managedElementId] = SELECTEDVALUE(FieldReplaceableUnit_productData[f_managedElementId]) && FieldReplaceableUnit_productData[f_fieldReplaceableUnitId] = SELECTEDVALUE(FieldReplaceableUnit_productData[f_fieldReplaceableUnitId])) ) ) VAR _Result = _Calculation RETURN IF( ISBLANK(_Calculation), 0, IF(_SerialNumber = _Calculation,0,1) )
Hi. Thanks for the feedback. I'm getting an error with equation provided, see below. Can you recommend a column equation as oppossed to a measure? The equation i mentioned previously was Column DAX
A single value for column 'f_serialNumber' in table 'FieldReplaceableUnit_productData' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
Can you share a sample data or a pbix file so I take a look?
- Anonymous2 years agoNot applicable
Sure, please see link below. You will notice that the hardware change on LK0191 was identified via the DAX equation sent on previously, but the one on DU0853 was not, because i'm missing data from the 29th Feb
https://drive.google.com/file/d/1CiqbhhnKhpuw4Nb75SmWbWo3DesHJud4/view?usp=drive_link
- _AAndrade2 years agoResident Rockstar
Anonymous you need to give me access
- Anonymous2 years agoNot applicable
Access granted