Forum Discussion
Counting Records With a Certain Value
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 🙂
parzival1220 , Better you unpivot the table and then use it
Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g
3 Replies
- amitchandakSuper User
parzival1220 , Better you unpivot the table and then use it
Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g
- parzival1220Frequent Visitor
Thanks very much amitchandak . I'll give it a try 🙂
- parzival1220Frequent Visitor
Thanks amitchandak . That worked a treat 👍