PowerBI



PowerBI

I have been working with Power BI implementation for the last couple of months. It's been a great experience and great tool to create different kind of datasets and dashboards. 

There are two important areas which we need to cover in this post.

1) ETL using Power Query M formula language
2) Aggregation/calculations for reports using DAX Formula

1) ETL:

After loading the initial data into powerbi, we can manipulate the datasets as per our present requirement. This is equivalent into our traditional ETL process.

Example :

let
    
    Source = Sql.Database("example.database.windows.net", "EXAMPLE"),
    dbo_ISSUES = Source{[Schema="dbo",Item="ISSUES"]}[Data],
    #"Renamed Columns" = Table.RenameColumns(dbo_ISSUES,{{"PRODUCT", "Product"}}}),
    #"Filtered Rows11" = Table.SelectRows(#"Renamed Columns", each true),
in <#"Filtered Rows2">

Power Query M formula language is optimized for building highly flexible data mashup queries as shown above. In this case, the output of every step is carry forward to the next step.

2) Aggregation/calculations for reports using DAX Formula:

Once you manipulate the initial data sets (like convert string into Date, create an extra column from any of the existing column etc.), you can write your formula to solve different requirements like calculate year-over-year growth compared to market trends, what is the total sales for month of Jan etc, 30days count, 60days count, Aging days etc..

Example :

60 Days = CALCULATE(COUNTROWS('REPORT'),'REPORT'[is60DaysAged]="yes",'REPORT'[Category]="Open")

Comments

Popular posts from this blog

ADF MODEL - VIEW CRITERIA (VC)

Developing Scalable Web Applications with Cloud Architecture

Best Practices