Forum Discussion
IEPMost
5 years agoHelper III
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 number | meter reader | err |
| 5 | 23650 | |
| 5 | 23703 | |
| 5 | 23723 | |
| 5 | 23723 | ERROR |
| 5 | 23723 | ERROR |
| 8 | 56230 | |
| 8 | 56742 | |
| 8 | 56742 | ERROR |
| 13 | 456900 | |
| 13 | 457100 | |
| 18 | 23470 | |
| 18 | 23650 | ERROR |
| 18 | 23899 |
I hope you know what I mean! Any help is much appreciated:-)
1 Reply
- amitchandakSuper User
IEPMost , Please find the attached file after the signature. I added an index column and try to do that. But have one difference.