Forum Discussion

IEPMost's avatar
IEPMost
Helper III
5 years ago

Help with DAX Command

Hi,

 

I have two columns [controller number] and [meter reader] in my Table.

 

Usually the values ​​of the column meter reader are continous. But if the value remains the same for a certain value in the Controller number column, the string "ERROR" should be appear in a new column. The main problem with my Command is that if a value from the meter reader column appears for two different values ​​from the controller number column, an "Error" is also returned as you can see in my example:

 

ERROR = IF(
COUNTROWS(FILTER('Table', 'Table'[controller number]=EARLIER('Table'[controller number])))>1,
IF(COUNTROWS(FILTER('Table','Table'[meter reader]=EARLIER('Table'[meter reader])))>1, "ERROR", BLANK()), BLANK())

 

controller numbermeter readererr
523650 
523703 
523723 
523723ERROR
523723ERROR
856230 
856742 
856742ERROR
13456900 
13457100 
1823470 
1823650ERROR
1823899 
 
I hope you know what I mean! Any help is much appreciated:-)