Get startedGet started for free

The Q&A visual

1. The Q&A visual

In this demo, we will work with the Q&A visual in Power BI. Let’s first narrow down this inspections chart to make some room on the Overview page. Then we’ll add a Q&A visual to the page. The Q&A visual starts with some suggestions but also includes a box in which we can enter questions about the data. Let’s look for the “number of inspections by date.” The Q&A visual is smart enough to recognize that “date” is ambiguous, as there are several dates available. It chose the inspection date, as we can see from the text. This is a little hard to read so let’s make it by year and month. We can change the type of visual we display using “as.” Let’s change this to be a column chart instead of a line chart. If we want to take what the Q&A visual gives us and do fine-grained tuning, we can convert it to a standard visual. For now, let’s leave that be. Instead, let’s go to the setup page and see what’s available. Two things of particular interest on this page are the Field synonyms and Teach Q&A tabs. Synonyms allow you to define alternative terms for a particular column or measure. Let’s navigate to Food Inspections and we can see that the Food Inspections column has a few suggested terms. Let’s select “examination” as that sounds pretty good. Then, in the Score column, let’s add a new value called rating, as we often hear these called ratings in practice. In the Teach Q&A tab, we can try out statements and define business jargon. Let’s search for “dirtiest inspections in Cary.” We can see that it already understands Cary as a city in Wake County but it doesn’t know what we mean by “dirtiest.” Even so, it can still make guesses. The idea of low scores is a good one, so let’s go with that. The preview shows us what the resulting chart might look like but I’m a bit concerned that it’s summarizing the score. We could change the query to show by inspection key. That looks like it will work so let’s close the window and save our changes. Let’s look at the “average rating by city” and see what we have. The scores are very similar, ranging from 95-99. Clayton is at the bottom of the list, so let’s look at the dirtiest inspections in Clayton. This gives us a table that we can drill into. If we select the second option from the list, we can see that it is a grocery and grill, with an inspection with a score of 84. We can mouse over it in our table and see some of the sorts of issues and then we can drill through to see more. You can see that we made some small modifications to the Inspection Report to make it a little more useful. It now includes comments from the food inspectors explaining what the issue was, as well as the inspection date, inspector name, and score. As a quick aside, you might be wondering how I got a left-aligned card for the inspector name. It turns out that cards are only center-alignable but what we can use to emulate a left-aligned card is a button. In the button text area, we can format based on a column and choose the inspector. Because there is only one inspector per inspection, the first inspector will do just fine. With Q&A, we can see now how somebody could write a natural-language query and use those results to get a better understanding of the situation. Now it’s your turn to try this out.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.