Forum Discussion
Comparing turnover in curved line chart
- 8 years ago
Hey,
I created the following chart
adding some stuff to the table you provided.
Here you will find the PBIX file
I did the following I created a separate date table using this simple DAX statement, a separate date table is always a good idea not to say a best practice:
Calendar = ADDCOLUMNS( CALENDAR("2016-01-01", "2018-07-31") ,"Month Name", FORMAT(''[Date], "MMM") ,"Month No", MONTH(''[Date]) ,"Year", YEAR(''[Date]) )I used the column "Month No" to order the column "Month Name"
In the "Data" view select "Sort by Column" from the "Modeling" menu
And I also created a relationship between the calendar tabel (one side) and the fact tabel (many side) - that's it :-)
Regarding the information "running live from my SQL Server" I guess you mean the connection is either "Direct Query" (the data is coming from the relational engine" or "Live Connection" if the data is hosted in SQL Server Analysis Services.
The solution I described above is relying on the existence of a calendar table, this table currently can just be created in Power BI if the data is imported, this will change as soon as the preview feature "Composite Model" will become generally available.
So eihter you import the data (then you have to consider how often the data needs to be refreshed) or ask the people that are owning the SQL Server data to create a Calendar table inside the SQL Server database,
Regards,
Tom
Hey,
I created the following chart
adding some stuff to the table you provided.
Here you will find the PBIX file
I did the following I created a separate date table using this simple DAX statement, a separate date table is always a good idea not to say a best practice:
Calendar =
ADDCOLUMNS(
CALENDAR("2016-01-01", "2018-07-31")
,"Month Name", FORMAT(''[Date], "MMM")
,"Month No", MONTH(''[Date])
,"Year", YEAR(''[Date])
)
I used the column "Month No" to order the column "Month Name"
In the "Data" view select "Sort by Column" from the "Modeling" menu
And I also created a relationship between the calendar tabel (one side) and the fact tabel (many side) - that's it :-)
Regarding the information "running live from my SQL Server" I guess you mean the connection is either "Direct Query" (the data is coming from the relational engine" or "Live Connection" if the data is hosted in SQL Server Analysis Services.
The solution I described above is relying on the existence of a calendar table, this table currently can just be created in Power BI if the data is imported, this will change as soon as the preview feature "Composite Model" will become generally available.
So eihter you import the data (then you have to consider how often the data needs to be refreshed) or ask the people that are owning the SQL Server data to create a Calendar table inside the SQL Server database,
Regards,
Tom
- aletho8 years ago
Helper I
Thanks, Tom! This is really helpful :)