Saturday, October 22, 2022

How to sort months chronologically in Power BI

It is simple to  get order by month name wise chronologically in PowerBI but if the data comes from AAS Tabular model cube then it is really difficult to get correct order. 

The month data comes like Apr-22, Aug-22, Feb-22, Jan-22 from DIM_DATE. but ideally we want month to Chronologically like  Jan-22, Feb-22, Mar-22....................Dec-22.

Table DIM_DATE and FACT_Sales_Order  based on these two table we have to generate report month wise with format of chronologically.

Database: Azure SQL DB

Cube: Azure Analysis Services

Report : Power BI




If you are using Visual Studio for AAS(Azure Analysis services) Tabular model, 
Select DIM_DATE table first and then choose properties  the column C_Month_Year(text data type) you want display as chronologically for month select Sort By column to Month_Num column( Int data type).




You can generate reports like below sorts months chronologically.








Wednesday, October 19, 2022

Friday, July 15, 2022

Create and manage tabular model Table partitions in AAS

Table in a tabular model is a single partition by default.  the large table like FACT TABLE with multi million rows are processed quickly if you created partitioned for this one.

DIM Table  : Keep default single partition

FACT Table : Try to create number of partition as you required based on partioned column like (year, or date )


let

    Source = #"SQL/sqlserver_database_windows_net ;Contoso",

    dbo_Sales = Source{[Schema="dbo",Item="Sales"]}[Data],

    #"Filtered Rows" = Table.SelectRows(dbo_Sales, each [OrderDateKey] >= 20220101 and [OrderDateKey] <= 20221231)

in

    #"Filtered Rows"


Wednesday, June 01, 2022

Announcing SQL Server 2022 public preview

Announcing SQL Server 2022 public preview: Azure-enabled with continued performance and security innovation is currently available to download public preview. Try latest version of SQL Server 2022 and you will find many cool features.

Announcing SQL Server 2022 public preview: Azure-enabled with continued performance and security innovation - Microsoft SQL Server Blog