0% found this document useful (0 votes)
56 views4 pages

Dashboard - Final Document

The document discusses setting up a dashboard in Power BI to analyze Adventureworks sales data. It includes instructions on connecting multiple tables, transforming date fields, and creating new columns and measures. Numerical measures to calculate metrics like total orders, revenue, returns and more are also defined using DAX.

Uploaded by

manivarma062000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views4 pages

Dashboard - Final Document

The document discusses setting up a dashboard in Power BI to analyze Adventureworks sales data. It includes instructions on connecting multiple tables, transforming date fields, and creating new columns and measures. Numerical measures to calculate metrics like total orders, revenue, returns and more are also defined using DAX.

Uploaded by

manivarma062000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Dashboard: Data- Adventureworks Sales

Get Data → Import all Tables


Establish Relational connection among Tables.
Check the following connection among tables. If not establish between them.

1. Calendar Lookup → Returns Data


[Date → ReturnDate]
2. Calendar Lookup → Sales Data
[Date → OrderDate]
3. Customer Lookup → Sales Data
[CustomerKey → CustomerKey]
4. Product Category Lookup → Product Subcategory Lookup
[ProductCategoryKey → ProductCategoryKey]
5. Product Lookup → Sales Data
[ ProductKey → ProductKey]
6. Product Lookup → Returns Data
[ProductKey → ProductKey]
7. Product Subcategory Lookup → Product Lookup
[ProductSubcategoryKey → ProductSubcategoryKey]
8. Territory Lookup → Returns Data
[SalesTerritoryKey → TerritoryKey]
Table: Calendar Lookup
Open Power BI → Transform Data → New Source →Connect to ‘Calendar Lookup’
Now click on the filed “Date’
Add Column Tab → Date

Date → Day → Name of Day


Date → Month → Month
Date →Month → Name of Month
Date →Quarter → Quarter of Year
Date →Week → Week of Year
Date →Month → Start of Year
Date →Quarter → Start of Quarter
Date →Week → Start of Week
Date →Year → Start of Year

Home Tab → Close & Apply


The work will be automatically saved.

Now create two new columns: Weekend and Quarter Name


Go to Data View → New Column
Weekend=IF(‘Calendar Lookup’[DayName] = "Saturday" || "Calendar Lookup' [Day Name]
= "Sunday", "Weekend","Weekday")

Go to Data View → New Column


Quarter Name = SWITCH(‘Calendar Lookup’[Quarter], 1,"Quarter 1",2,"Quarter
2",3,"Quarter 3",4,"Quarter 4", “Others”)

Table: Customer Lookup


Open Power BI → Transform Data → New Source →Connect to ‘Customer Lookup’

View Tab → Column Distribution → Remove Errors


Home Tab → Close & Apply
The work will be automatically saved.
Go to Data View → New Column
Parent = IF('Customer Lookup’[TotalChildren]>0,"Yes", "No")

Customer Priority= IF(‘Customer Lookup'[Parent] = "Yes" &&


'Customer Lookup'[AnnualIncome] >100000, “Priority","Standard")

Education Category = SWITCH (‘Customer Lookup'[EducationLevel],


"High School" High School", "Partial High School", "High School", “Bachelors", “UG”,
“Partial College”, “UG”, “Graduate Degree”, “UG”)
Income level = IF('Customer Lookup’[AnnualIncome] > = 150000,"Very High",
IF('Customer Lookup’[AnnualIncome] >=100000,"High",
IF(‘Customer Lookup’[AnnualIncome] >= 50000, "Middle Class", "Low")))

Create the following Numerical Measures using DAX

1. Average Retail Price = AVERAGE( Product lookup [ProductPrice])

2. Quantity Returned= SUM(‘Returns Data’[ReturnQuantity])

3. Quantity Sold = SUM(‘Sales Data'[OrderQuantity])

4. Red Sales = CALCULATE([Quantity Sold], 'Product Lookup'[ProductColor]= "Red")

5. Total Cost= SUMX('Sales Data', 'Sales Data’[OrderQuantity]*RELATED( ‘Product


Lookup'[ProductCost]))

6. Total Customers=DISTINCTCOUNT (‘Sales Data’[CustomerKey])

7. Total Orders= DISTINCTCOUNT (‘Sales Data’[OrderNumber])

8. Total Returns = COUNT(' Returns Data' [ReturnQuantity])

9. Total Revenue= SUMX(‘Sales Data', ' Sales Data'[OrderQuantity] *


RELATED(‘Product Lookup'[ProductPrice]))

10. Weekend Orders= CALCULATE ([Total Orders],'Calendar Lookup’[Weekend]=


"Weekend")

11. Total Profit = [Total Revenue] - [Total Cost]

12. Bike Returns = CALCULATE([Total Returns], ‘Product Categories lookup’


[CategoryName]= “Bikes”)

13. Bulk Orders= CALCULATE(Total Orders], ‘Sales Data’[OrderQuantity] >1)

14. High Ticket orders = CALCULATE([Total Orders], Filter (‘Product Lookup’,


‘Product Lookup’[ProductPrice] > 714.44)

15. Previous Month orders = CALCULATE([Total Orders], DATEADD(‘Calendar


Lookup’[Start of Month], -1, Month))

16. Previous Month Returns= CALCULATE ([Total Returns], DATEADD (‘Calendar


Lookup’[Start of Month], -1, Month))

17. Previous Month Revenue = CALCULATE ([Total Revenue], DATEADD (‘Calendar


Lookup’[Start of Month], -1, Month))

18. Return Rate = DIVIDE([Quantity Returned], [Quantity Sold], "No Sales")


19. Revenue Target = [Previous Month Revenue] *1.1

You might also like