Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How do I count rows that consist of dates into a line graph? And possible even make a forecast?

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. 

 

data_picture.PNG

1 ACCEPTED SOLUTION
changqing
Resolver II
Resolver II

Hi @Anonymous ,

 

Is this what you want?

changqing_0-1660202757028.png

You can create a calendar table and two measures, and drag the appropriate fields into the line chart.

Calendar table:

changqing_1-1660202911713.png

Realtionships:

changqing_2-1660202933928.png

Measures:

Count of start date = 
COUNT('Table'[Start Date]) + 0
Count of recent start date = 
CALCULATE(COUNT('Table'[Recent Start Date]),USERELATIONSHIP('Table'[Recent Start Date],'Calendar'[Date])) + 0

The PBIX file is attached for reference:

PBIX file

 

Best Regards,
changqing

View solution in original post

2 REPLIES 2
changqing
Resolver II
Resolver II

Hi @Anonymous ,

 

Is this what you want?

changqing_0-1660202757028.png

You can create a calendar table and two measures, and drag the appropriate fields into the line chart.

Calendar table:

changqing_1-1660202911713.png

Realtionships:

changqing_2-1660202933928.png

Measures:

Count of start date = 
COUNT('Table'[Start Date]) + 0
Count of recent start date = 
CALCULATE(COUNT('Table'[Recent Start Date]),USERELATIONSHIP('Table'[Recent Start Date],'Calendar'[Date])) + 0

The PBIX file is attached for reference:

PBIX file

 

Best Regards,
changqing

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. I cannot help you without meaningful sample data.
Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive. I cannot use screenshots of your source data.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.