Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I would like to have the start date (the amount of the same dates, counting) in a line graph as well as the recent start date (the amcount of the same dates, counting)
For example, in the line graph I would like to have all the dates that relate tot september 2020 in one point of the graph, as well as the other months. Do I make an index column to give the rows a number in order to make the graph? How do I make this graph?
Note: I am new to Power BI and English is not my first language. Thank you in advance.
Solved! Go to Solution.
Create a proper Date table and then create 2 relationships from the Date table to your current table, one linking to the start date and one linking to the recent start date. You can make both relationships inactive.
Create 2 measures like
Num rows using start date = CALCULATE( COUNTROWS( 'Table' ), USERELATIONSHIP( 'Date'[Date], 'Table'[Start date]) )
Num rows using recent start date = CALCULATE( COUNTROWS( 'Table' ), USERELATIONSHIP( 'Date'[Date], 'Table'[Recent start date]) )
Now you can put columns from your Date table into a line chart and add the new measures.
Hi @Anonymous ,
In addition to johnt75's reply, you can try CALENDAR() OR CALENDARAUTO() function to create a DimDate table.
DimDate =
ADDCOLUMNS( CALENDARAUTO() ,"Year",YEAR([Date]),"Month",MONTH([Date]),"MonthName",FORMAT([Date],"MMMM"))
Then create relationships and measures as he mentioned above.
Result is as below.
Best Regards.
Create a proper Date table and then create 2 relationships from the Date table to your current table, one linking to the start date and one linking to the recent start date. You can make both relationships inactive.
Create 2 measures like
Num rows using start date = CALCULATE( COUNTROWS( 'Table' ), USERELATIONSHIP( 'Date'[Date], 'Table'[Start date]) )
Num rows using recent start date = CALCULATE( COUNTROWS( 'Table' ), USERELATIONSHIP( 'Date'[Date], 'Table'[Recent start date]) )
Now you can put columns from your Date table into a line chart and add the new measures.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
25 | |
21 | |
19 | |
14 | |
11 |
User | Count |
---|---|
43 | |
35 | |
25 | |
22 | |
22 |