This is a Doku for retail analysis sample with Power BI.
Source: https://docs.microsoft.com/en-us/power-bi/sample-retail-analysis from http://obvience.com/
Before going further, we need understand the concept of the data model, please read the link below: https://en.wikipedia.org/wiki/Data_model
This analysis contains 4 entity (table) and every table has to attribute.
- store:
- LocationID
- City Name
- Territory
- PostalCode
- OpenDate
- SellingAreaSize
- DistrictName
- Name
- StoreNumberName
- StoreNumber
- City
- Chain
- DM
- DM_Pic
- DistrictID
- Open Month No
- Open Month
- Open Year
- Store Type
- item
- ItemID
- Segment
- Category
- Buyer
- FamilyNane
- time
- ReportingPeriodID
- Period
- FiscalYear
- FiscalMonth
- Month
- district
- District
- DM
- DM_Pic_fl DM_Pic
- BusinessUnitID
- DMImage
- sales fact
- MonthID
- ItemID
- LocationID
- Sum_GrossMarginAmount
- Sum_Regular_Sales_Dollars
- Sum_Markdown_Sales_Dollars
- ScenarioID
- ReportingPeriodID
- Sum_Regular_Sales_Units
- Sum_Markdown_Sales_Units
Let's make the data model from the 4 entity. Just drag every Primary Key of the entity in power pivot or power bi data model
After that, create a measure in power bi or power pivot
Below are the measure of every graph,
Note! we use the format of table and attribut with DAX language
Extras: Quick Guide DAX
Drag this entity for every graph
- This Year Sales by Chance graph:
-
(Store)[Chain]
-
(Sales)[This Year Sales] := [TotalSalesTY]
DAX -> TotalSalesTY = CALCULATE([TotalSales], Sales[ScenarioID]=1)
- New Stores graph: . . .coming soon