Forum Discussion
How to find valid values based on multiple tables
Nope,
My raw data (in the example provided) contains 4 columns (the formatting on the forum is not the best):
| Attributes | Value | Data validation | Specific? |
The Data validation column (and, if present, the Specific? one) defines the name of the table where the valid set of values are to be found for that specific attribute.
I hope this clarifies it.
Thanks
what do you want now? check if value exists in the data validation table?
| Attributes | Value | Data validation | Specific? | Valid |
| Num1 | 1 | TableNum | TN_C1 | TRUE |
| Num2 | 2 | TableNum | TN_C1 |
TRUE |
| Num3 | 3 | TableNum | TN_C1 | TRUE |
| Text1 | 4 | TableTxt | TT_C1 | FALSE |
| Text2 | 5 | TableTxt | TT_C1 | FALSE |
| Text3 | a | TableTxt | TT_C1 | TRUE |
| Num4 | b | TableNum | FALSE | |
| Num5 | 8 | TableNum | TRUE | |
| Text4 | 9 | TableTxt | FALSE |
value 1 from TableNum, then true? value 9 not from TableTxt then FALSE?
- Anonymous5 years agoNot applicable
"value 1 from TableNum, then true? value 9 not from TableTxt then FALSE?"
Correct
- ryan_mayu5 years agoSuper User
- Anonymous5 years agoNot applicable
Thank you ryan_mayu .
This relies on manually define the variables, right?
So, if I have 30 different Data Validation table I'd need to define the variables one by one?
What I am trying to get is that the definition of the validation tables are in the raw data (which I have) and that this specifies where to go and find the valid values. I am trying something like the IF(...IN DISTINCT()) approach, but that moves away from having to hard-code (variables or many different, possibly hundreads of tables) in the DAX. As I have already everything defined, either in the raw data or in the validation table, I would like to move away from the variables (unless they can be parametrised and created automatically from information in the raw data table).
Thank you