Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there,
Apologies if this topic has been covered before, but I couldn't find anything quite like this in other threads.
I have a dataset with a number of fields that contain either a 'Y' or 'N' value. The data is all imported into Power BI via a SQL script (Import Query). The columns look like this in the SQL output:
I need to produce a bar graph (or similar visualisation) that only counts the number of 'Y' values in each column. The idea is that the end result will be a visual that the user will be able to interact with, e.g. the user will be able to click on the visual and see all the records with a 'Y' in the column they have selected.
Is there a specific function / approach I could use please? I've had a go with DAX, but that's pushing me down the measures route and my team would like an interactive visual for ease of use.
Many thanks in advance and please do ask if any further info is required 🙂
Solved! Go to Solution.
@parzival1220 , Better you unpivot the table and then use it
Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g
https://radacad.com/pivot-and-unpivot-with-power-bi
@parzival1220 , Better you unpivot the table and then use it
Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |