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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
TOGA
Regular Visitor

Line Chart x axis every day

Hi,

 

I'd like to create a line chart with every day in 2022 being on the x axis. 

 

I am in sales and we have various service contracts that incept during this year. Every contract has it's own amount and I would like to have a cumulative line chart that shows the cumulative value of service contracts agreed this year. The y axis should be the cumulative sales amount, the x axis should be 2022, but with every day basically as a data point (and not months or quarter) to see how the sales volume is increasing over the course over the year. 

So in below table for example, for five days Jan 1 to Jan 5 the value would be 0. On Jan 6 the value would jump to $45,000 and would remain at $45,000 until Jan 15. On Jan 16 we signed another contract worth $50,000 so the cumulative line would jump to $95,000. And so on. 

 

AccountInception DateValue New Service ContractExpiry Date of old contractExpiring Service Contract Value
1/6/2022450001/5/202240000
B  1/10/202250000
C1/16/2022500001/15/202255000
D1/25/202260000  
E  2/1/202260000
F2/3/2022350002/10/202230000
G  2/10/202235000
H2/20/202240000  
I2/27/2022450002/26/202220000
J3/6/2022600003/5/202235000
K3/20/202220000  

 

In the same line chart I would like to have another line showing the cumulative value of the expiring service contracts. So similar, to have the line of the sum of all the expiring values over 2022, with every day as one data point. 

 

I am really struggling to make this work - can someone help me please?
Thank you!

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @TOGA 

 

To calculate the cumulative value, try the following method.

Column:

Cumulative value new =
CALCULATE (
    SUM ( 'Table'[Value New Service Contract] ),
    FILTER ( 'Table', [Inception Date] <= EARLIER ( 'Table'[Inception Date] ) )
)
Cumulative value due =
CALCULATE (
    SUM ( 'Table'[Expiring Service Contract Value] ),
    FILTER (
        'Table',
        [Expiry Date of old contract]
            <= EARLIER ( 'Table'[Expiry Date of old contract] )
    )
)

However, it is not possible to make the date table active with two date columns at the same time. Therefore, it is not possible to display the complete line chart in the same chart. In this case, the line graph can only be viewed separately.

vzhangti_0-1644221290401.png

 

Best Regards,

Community Support Team _Charlotte

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

 

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @TOGA 

 

To calculate the cumulative value, try the following method.

Column:

Cumulative value new =
CALCULATE (
    SUM ( 'Table'[Value New Service Contract] ),
    FILTER ( 'Table', [Inception Date] <= EARLIER ( 'Table'[Inception Date] ) )
)
Cumulative value due =
CALCULATE (
    SUM ( 'Table'[Expiring Service Contract Value] ),
    FILTER (
        'Table',
        [Expiry Date of old contract]
            <= EARLIER ( 'Table'[Expiry Date of old contract] )
    )
)

However, it is not possible to make the date table active with two date columns at the same time. Therefore, it is not possible to display the complete line chart in the same chart. In this case, the line graph can only be viewed separately.

vzhangti_0-1644221290401.png

 

Best Regards,

Community Support Team _Charlotte

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

 

JirkaZ
Solution Specialist
Solution Specialist

Shouldn't a measure like this do the trick? 

CALCULATE(SUM(Amount), [Inception Date] <= MAX([Date]))

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors