Forum Discussion
Create Bar Chart That Compares Counts Of Values Across Multiple Columns
Hi,
RIght click on the Job ID number column in the Query Editor and select "Unpivot other columns". Drag the Value field to the visual and write this measure
=DISTINCTCOUNT(Data[Job ID])
Hope this helps.
Thanks for the response Ashish_Mathur ! That seems to have solved my problem. However, by unpivoting the data, that seemed to have messed up the visualizations i had that were based on the data before being unpivoted. I must also add that the table described above actually has many more columns in it (probably 30 or so) that i do NOT want included in this chart visual (But are relevant for other visualization on my dashboard). In order to unpivot, it made sense to "Choose columns" and reduce the set of data to unpivot to only filter down to the columns that i want to unpivot).
Does this mean i need multiple queries so some visualizations can be based on the unpivoted data, and others will be based on the normal set?
- Ashish_Mathur6 years agoSuper User
You are welcome. No, you should not need multiple queries. All your visuals and calculations should be based on the unpivoted dataset.
- JDpowerBI6 years agoNew Member
Hi Ashish_Mathur,. Since my "EVENT" table which contains the Resource columns listed above, and additional columns, how do i filter down the measure to only use specific columns in the count? =DISTINCTCOUNT(Data[Job ID])
I know we can use the filter where the visuals are too, but is that the only way?
- Ashish_Mathur6 years agoSuper User
Hi,
I do not understand your question. Share some data and show the expected result.
- Anonymous6 years agoNot applicable
Hi JDpowerBI,
Perhaps you can try to duplicate the original query table and do unpivot columns on it, save changes and return to the data view side. (you can use the category column as the relationship key to link both two tables)
After these steps, you can simply create visuals based on two table fields and do interaction between different visuals.
Regards,Xiaoxin Sheng