All about DataSince, DataEngineering and ComputerScience
View the Project on GitHub datainsightat/DataScience_Examples
Udacity: Data Analysis and Visualization with Microsoft Power BI Dax Studio PowerBI
Power BI = Power Query + Data Model + Power BI Report
M | Both | DAX |
---|---|---|
Data Connections | Calculated Columns | Calculated Measures |
Data Fromatting | Calculated Tables | Analysis |
Data Cleaning | Table Splitting (M) | Analysis |
Data Organizing | Tabel Joining (M) | Visual Filters |
M | DAX | |
---|---|---|
Pro | Evaluation at refresh | Flexibility with measures and filters |
Con | No measures | Can slow down data model |
Calendar(<startdate>,<enddate>)
CalendarAuto()
New Source > Blank Query
= Date.StartOfYear(List.Min(#"Sales Transactions"[Date]))
= Date.EndOfYear(List.Max(#"Sales Transactions"[Date]))
rename Queries “Start” and “End”.
New Source > Blank Query
= {Number.From(#"Start")..Number.From(#"End")}
convert to table, convert column to date format.
Direction from dimension table to fact table.
Cardinalitly | Description |
---|---|
One-to-many | One value in dimension table relates to many values in fact table |
One-to-one | |
Many-to-many |
Filter direction | Description |
---|---|
Single | Filters can be applied in one direction |
Both | Filters can be applied in both directions |
Check, if a merged table is possible for the requirement.
An item is related to multiple categories. Leverages bi-directional filters. Causes unpredictable results.
Report pane reflects data in model, plus the filters applied. Filter pane applies filters for a visual, an entire page or all report pages.
If on of the fact tables has as different level of granularity, a many-to-many relation might occur. To avoid suach a relation, use a Bridge table. Fact Table High Granularity < many-to-one < Dimension 1 with additional column for lower granularity > many-to-one > Bridge > one-to-many > Fact Table Low Granularity
Use the dax function USERELATIONSHIP to express to which of the many date columns in your fact table the date table should relate to. Examples for different date columns might be order date, shipping date …
Another option is to create new date tables for each date column.
Table is not related to fact table, like a “What-if” Parameter.
New Forecast = 'What-if'[Forecast Adjust Value] * sum('Forecast'[forecast QTY Sales])
A | B | C | D |
---|---|---|---|
###
https://www.youtube.com/watch?v=WgIhsF7kEjI
https://www.youtube.com/watch?v=uPHwjPRnRwE
Stage | Description | Example |
---|---|---|
Define | Problem Statement | We need to prepare for the challenges of an aging population |
Construct | Research Topic | Which countries age the fastest? |
Retrieve | Access Data Sources | Census data, population statistics, economic data |
Cleaning | Clean and Organize the Data | |
Conclusion | Take Measurements, make Conclusion |