Forum Discussion
Numeric ID as Categorical Variable
I have an variable that's an integer identifier. I want a chart that displays the average of some other variable for each unique option of this ID variable. When I try and do this in Power BI, it just displays the grand mean (or whatever other aggregate calculation) across each unique value, rather than each unique value's aggregation. How do I tell Power BI to treat this numeric ID Variable as a categorical?
I might be misunderstanding something here but I have no problems doing this. Both the columns are whole numbers. All I have to do is put on column in Axis and the other in Value and Power BI does the rest. Are you doing something different?
4 Replies
- bidgeirMost Valuable Professional
I might be misunderstanding something here but I have no problems doing this. Both the columns are whole numbers. All I have to do is put on column in Axis and the other in Value and Power BI does the rest. Are you doing something different?
- pbaumgartnerNew Member
That's exactly what I'm doing too, I even recreated with some different variables to ensure it wasn't just something weird about that specific combination.
If it makes any difference, I'm connected via ODBC to a Postgres database.
- pbaumgartnerNew Member
Got it figured out, there was some artefact in the data that was causing the calculation execute incorrectly. Thanks for your help.