cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
bchhugwani Frequent Visitor
Frequent Visitor

Cumulative Sum using Line Graph on two different dates of Same relation

Hello Experts,

 

Data.PNGData

 

I am trying to plol count of PlannedDate Vs Date as one line and count of ActaulDate Vs Date as second line in same LINE GRAPH. 

Tried using populating Calendar table but somehow not able to ply on Line Graph. Any help would be highly appreciated.

Note: Count is cumulative for both lines

 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Cumulative Sum using Line Graph on two different dates of Same relation

Hi @bchhugwani ,

 

We can create relatioships between tables like this.

 

Capture.PNGTo create measures as below.

Actual = 
IF (
    ISBLANK ( COUNT ( 'Table'[ActualDate] ) ),
    BLANK (),
    CALCULATE (
        COUNT ( 'Table'[ActualDate] ),
        FILTER ( ALL ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) )
    )
)
Plan = 
IF (
    ISBLANK ( COUNT ( 'Table'[ActualDate] ) ),
    BLANK (),
    CALCULATE (
        COUNT ( 'Table'[PlannedDate] ),
        FILTER ( ALL ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) ),
        USERELATIONSHIP ( 'Table'[PlannedDate], 'Date'[Date] )
    )
)

2.PNG

Community Support Team _ Frank
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
Community Support Team
Community Support Team

Re: Cumulative Sum using Line Graph on two different dates of Same relation

Hi @bchhugwani ,

 

We can create relatioships between tables like this.

 

Capture.PNGTo create measures as below.

Actual = 
IF (
    ISBLANK ( COUNT ( 'Table'[ActualDate] ) ),
    BLANK (),
    CALCULATE (
        COUNT ( 'Table'[ActualDate] ),
        FILTER ( ALL ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) )
    )
)
Plan = 
IF (
    ISBLANK ( COUNT ( 'Table'[ActualDate] ) ),
    BLANK (),
    CALCULATE (
        COUNT ( 'Table'[PlannedDate] ),
        FILTER ( ALL ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) ),
        USERELATIONSHIP ( 'Table'[PlannedDate], 'Date'[Date] )
    )
)

2.PNG

Community Support Team _ Frank
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

bchhugwani Frequent Visitor
Frequent Visitor

Re: Cumulative Sum using Line Graph on two different dates of Same relation

Thank You @v-frfei-msft for the response. As I can see in data for PlannedDate as July 17 2019 but in line graph I cannot se plot for the same.Also max date for planned date is 23 July 2019 and In line graph we see its plotted till 24th July 2019. 

Is there any way to plot exact data points on line graph? ActualDate have been plotted exactly as relationship is active for that. If we active PlannedDate relationship then ActualDate plot gets dropped.

Could you please suggest me on this.

 

Thanks a lot!!

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 485 members 4,391 guests
Please welcome our newest community members: