You did know that Power BI supports natural language queries, right? All you need to do is to add the Q&A button to your report and your customers will be able to navigate their data just by asking questions:
We have recently just released a set of new capabilities for Q&A for you to all enjoy;
- Ask a related question
- Row level security over Cloud AS models
Ask a related question
If you caught the November release of Power BI Desktop, you may have noticed that the Power BI team has released ‘Ask a follow up’. This new feature provides the ability to ask a related or follow up question using natural language. Great, right? But how does it work?
Let’s play out a simple scenario. Suppose you are a sales manager and ask what is the ‘top performing product by sales revenue’. After typing this into the Q&A textbox you be presented with an answer something like below:
Great, we can clearly see which products are performing and which are not. Now let’s suppose you wish to ask ‘How about in Australia’ implying you wish to see which products have the highest revenue in Australia. Before, you had to use the original query with the qualification; ie, top performing product by sales revenue in Australia. With the new follow up capability, you can now seamlessly ask these types of follow ups naturally without having to reconstruct a new question. Power BI will maintain your previous question, like that a normal person and will try to understand your follow up based off the original question.
Let’s see this in action. Click on the ‘Ask a follow up button’ and then type in ‘What about in Australia’ and voila, it will now have understood what you meant and returned the visual below.
Follow up types
We support a range of different ways you can use a follow up question. You can modify the original question, ask a related question, augment the original question, and keep going until you get the answer you want.
Modifying the original question
There are several different ways you can request an answer to a similar but slightly modified question. First, you can use pronouns to ask a similar question that refers to part of the previous question:
Original Question: How many Chicago customers bought green products
Follow up: How many Seattle customers bought them?
Or like this:
Original Question: Show the total sales to Chicago customers
Follow up: What was it for 2016?
Second, you can use a key phrase such as “what about”, “instead”, “also”, or “include” to indicate you want to modify the previous question. Here are some examples:
Original Question: How many Chicago customers bought green products?
Follow up: What about red products?
Original Question: Which Chicago customers bought green products?
Follow up: Show Seattle customers instead
Original Question: How many customers bought green products in store 6?
Follow up: Include store 7
Third, you can repeat a phrase from the previous question, with a slight modification to indicate what you’d like to change:
Original Question: Count the green products bought by customers in Chicago
Follow up: In Seattle
Original Question: Count the green products bought by customers in Chicago
Follow up: Red products
And finally, you can also modify your question by simply typing a phrase that should be used as an extension of your previous question like this:
Original Question: How many customers bought green products?
Follow up: In 2017
Original Question: Show the total sales of green products by city
Follow up: As a column chart
Asking an Entirely New Related Question
There’s nothing that restricts you to just modifications, however. You can also use pronouns to reuse parts of what you asked about earlier in entirely new questions:
Original Question: Count the Seattle customers
Follow up: What did they buy last year?
Original Question: Which Seattle customers bought discontinued red products?
Follow up: What is the average price of those products?
Augment the Original Question
You can also include additional columns, group or sort by a column, or display the result as a specific type of visual:
Original Question: Count the customers
Follow up: Group by city
Original Question: List the products
Follow up: Sort by total sales, descending
Original Question: Which customers bought cheese last month?
Follow up: Include their ages
Original Question: Count the customers by city
Follow up: As a bar chart
Putting It All Together
You can continue to ask additional follow up questions, honing and modifying as needed, effectively having an ongoing conversation with your data:
Original Question: Which Seattle customers bought red products
Follow up: Count them
Follow up: Show Chicago instead
Follow up: Include green products
Follow up: What about in 2017?
Follow up: Group by state
Follow up: As a column chart
Q&A now supports row level security
Power BI has added support for asking Q&A questions against cloud models with row-level security. This new capability involves security at all layers. In addition to standard prevention of access to restricted data, Q&A refuses to even acknowledge the existence of that data. When your users ask questions, Q&A will respect the row-level security you have implemented, carefully not recognizing values which that user doesn't have access to. So, for example, while the Western Region Sales Manager will be able to able to ask "How many tons of rice did Contoso order from Mary Jones last week?", since the Eastern Region Sales Manager isn't authorized to know about employees or accounts from other regions, both "Contoso" and "Mary Jones" will appear to be unrecognized when they type in that same question. For additional information on row-level security in cloud models, see https://docs.microsoft.com/en-us/power-bi/service-admin-rls.
We hope you enjoy these new capabilities, stay tuned for more updates!