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

The Fabric Community site will be in read-only mode on Monday, Feb 24 from 12:01 AM to 8 AM PST for scheduled upgrades.

Reply
Anonymous
Not applicable

Earn vs Plan Line Graph

Hi there, i need to create a line chart that has a "Plan" line that begins where the "Earned" line ends. I currently have the following measures for "Earned" & "Plan"

 

Earned Line =
IF(MAX(fact_ManhourProgress[Date]) <= TODAY(),
CALCULATE(
SUM(fact_ManhourProgress[Value]),
FILTER(ALLSELECTED(fact_ManhourProgress),fact_ManhourProgress[Date] <= MAX(fact_ManhourProgress[Date])),
FILTER(ALLSELECTED(fact_ManhourProgress),fact_ManhourProgress[Type]="Current"),
FILTER(ALLSELECTED(fact_ManhourProgress),fact_ManhourProgress[Spreadsheet Field]="Actual Units")))
 
Plan Line =
IF(MAX(fact_ManhourProgress[Date]) >= TODAY(),
CALCULATE(
SUM(fact_ManhourProgress[Value]),
FILTER(ALLSELECTED(fact_ManhourProgress),fact_ManhourProgress[Date] <= MAX('fact_ManhourProgress'[Date])),
FILTER(ALLSELECTED(fact_ManhourProgress[Type]),fact_ManhourProgress[Type]="Current"),
FILTER(ALLSELECTED(fact_ManhourProgress),fact_ManhourProgress[Spreadsheet Field]="Remaining Units")))
 
I need the plan line to take the total from the earned line and begin on the plan date.
 
Any help is much appreciated
1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

HI, @Anonymous 

After my research, you could try this formula as Plan measure

 

Plan Line =
IF (
    MAX ( fact_ManhourProgress[Date] ) >= TODAY (),
    CALCULATE (
        SUM ( fact_ManhourProgress[Value] ),
        FILTER (
            ALLSELECTED ( fact_ManhourProgress ),
            fact_ManhourProgress[Date] <= MAX ( 'fact_ManhourProgress'[Date] )
                && fact_ManhourProgress[Date] >= TODAY ()
        ),
        FILTER (
            ALLSELECTED ( fact_ManhourProgress ),
            fact_ManhourProgress[Type] = "Current"
        ),
        FILTER (
            ALLSELECTED ( fact_ManhourProgress ),
            fact_ManhourProgress[Spreadsheet Field] = "Remaining Units"
        )
    )
        + CALCULATE (
            SUM ( fact_ManhourProgress[Value] ),
            FILTER (
                ALLSELECTED ( fact_ManhourProgress ),
                fact_ManhourProgress[Date] <= MAX ( fact_ManhourProgress[Date] )
                    && fact_ManhourProgress[Date] <= TODAY ()
            ),
            FILTER (
                ALLSELECTED ( fact_ManhourProgress ),
                fact_ManhourProgress[Type] = "Current"
            ),
            FILTER (
                ALLSELECTED ( fact_ManhourProgress ),
                fact_ManhourProgress[Spreadsheet Field] = "Actual Units"
            )
        )
)

For example:

In my sample example:

3.JPG

 

Best Regards,

Lin

 

Community Support Team _ Lin
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-lili6-msft
Community Support
Community Support

HI, @Anonymous 

After my research, you could try this formula as Plan measure

 

Plan Line =
IF (
    MAX ( fact_ManhourProgress[Date] ) >= TODAY (),
    CALCULATE (
        SUM ( fact_ManhourProgress[Value] ),
        FILTER (
            ALLSELECTED ( fact_ManhourProgress ),
            fact_ManhourProgress[Date] <= MAX ( 'fact_ManhourProgress'[Date] )
                && fact_ManhourProgress[Date] >= TODAY ()
        ),
        FILTER (
            ALLSELECTED ( fact_ManhourProgress ),
            fact_ManhourProgress[Type] = "Current"
        ),
        FILTER (
            ALLSELECTED ( fact_ManhourProgress ),
            fact_ManhourProgress[Spreadsheet Field] = "Remaining Units"
        )
    )
        + CALCULATE (
            SUM ( fact_ManhourProgress[Value] ),
            FILTER (
                ALLSELECTED ( fact_ManhourProgress ),
                fact_ManhourProgress[Date] <= MAX ( fact_ManhourProgress[Date] )
                    && fact_ManhourProgress[Date] <= TODAY ()
            ),
            FILTER (
                ALLSELECTED ( fact_ManhourProgress ),
                fact_ManhourProgress[Type] = "Current"
            ),
            FILTER (
                ALLSELECTED ( fact_ManhourProgress ),
                fact_ManhourProgress[Spreadsheet Field] = "Actual Units"
            )
        )
)

For example:

In my sample example:

3.JPG

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks you are awesome!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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