In this tutorial, we will be looking at how Power BI DAX and Visualization come handful in meeting report requirement for a business case scenario.
As a Sales Analyst in a Pizza restaurant, you are to analyze a daily sales transaction and Sales Target Excel record on Power BI. You are to show on your dashboard to meet Sales manager requirement; the total number of sales transactions and a visual to show the Sales performance versus the Sales Target over time. How would you handle this task?
Assuming the Excel files had already been imported into power BI as seen on the Model View.

To Ascertain the number of Sales Transactions we will use a Calculated measure that uses a formula of COUNTROWS(TABLE). The Table we are referring to is the named Sales Data Table which makes it COUNTROWS(‘Sales Data’)




No. of Sales Transactions = COUNTROWS(‘Sales Data’)
To view the result, you will have to drag the measure on the field to your report. We will use a single Card as our Visualization tool as seen below.




For the Second report requirement to view the Sales Performance by sales Target we must Establish an interaction between the two tables via a relationship. Click on Manage relationship and select same column headers between both tables.








Notice we have the Price, Quantity but no Sales Amount column on our Sales Data. To solve that we need to insert a Calculated column by clicking on the new column on the Home Tab.
Sales Amount = ‘Sales Data'[Price]*’Sales Data'[Quantity]




Now we can go ahead and build the Visual. We will use the Gauge visualization tool.
On the field drag the Sales Amount to Values, the Sales Target to Target values




From the visual, we can see that the Sales team exceeded their Sales Target by two million.
Hope you found this helpful!
Do not forget to check out our training courses: https://www.urbizedge.com.