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
SH-VE
Helper IV
Helper IV

Line chart with each quarter as line

HI All, 

 

I need to create a line chart daily production for each quarter (Q1, Q2.... – one line for Q1 and one line Q2). So the x-axis will simply be the day of the quarter, not the date but the day.  So day 1, day 2, etc so that we can plot the lines similarly.  The objective is to compare production day-wise for every quarter . 

 

I have data in two tables . Table 1 is a date table in which I have added Day of the quarter. Table 2 is a fact table having date of production and quantity produced . The tables hence have 1 to many relationship. 

 

Question:   How an I create a dynamic chart for this? To achive this do I need to create a measure (

Q12021 = CALCULATE(SUM(HSM_COIL[Coil_Tons]), FILTER('Date Table', 'Date Table'[QuarterOfYear] = "Q1 2021"))) 

for each quarter and then plot them as line on the chart?

How do I address the further quarters, eg Q4 2021,  Q1 2022, Q2 2022 etc. ? x

 

Final Chart required

 

OUtput Chart.png

 Data Tables.pngDAta Table relationship.png

 

 

Thanks for help,

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @SH-VE ,

 

In the calendar table, you can create the calculated column which is the days of the quarter like

Day = RANKX(FILTER(ALL('Table 2'),[Quarter]=EARLIER('Table 2'[Quarter])),[Date],,ASC,Dense)

16.png17.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @SH-VE ,

 

In the calendar table, you can create the calculated column which is the days of the quarter like

Day = RANKX(FILTER(ALL('Table 2'),[Quarter]=EARLIER('Table 2'[Quarter])),[Date],,ASC,Dense)

16.png17.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ThankYou. This was helpful.

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.

Top Solution Authors