Forum Discussion

parzival1220's avatar
parzival1220
Frequent Visitor
3 years ago
Solved

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 🙂