I have created a custom model with sql. I chose to map a few of the columns to their associated table fields in the database.
There is a field in "table_a" called "eng_name" and a field in "table_b" called "eng_name". In my model I have mapped "Column X "to it's corresponding table field table_a.eng_name and "Column Y" to it's corresponding table field table_b.eng_name. I am using table aliases in my query so it is clear that these fields are from different tables.
However, when I ask a question with the QB that groups by "Column X", the values in "Column Y" appear. My guess is that it has to do with the fact that in the database the fields have the same name "eng_name".
Expected Behavior: When I group by "Column X" (which, in the metadata, is mapped to table_a.eng_name), the values from table_a.eng_name appear.
Actual Behavior: When I group by "Column X" (which, in the metadata, is mapped to table_a.eng_name) , the values from table_b.eng_name appear.
Hi @mere_data_analyst
Post "Diagnostic Info" from Admin > Troubleshooting.
I cannot reproduce. Use a View on your database instead of Models if you are having problems. Or use SQL as the base of the Model.