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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Cumulative Count by Date - Actual vs Planned

Hello,

 

I am new to the power Bi world and hoping I can get some guidance in terms of calculating the count of dates for planned vs actual by month to allow me to plot both lines in a S-Curve

 

I have included the sample dataset I am using as well as my .pbix file 

 

I was able to get the S curve the way want. But, the problem I am facing is the count of actuals by month is not correct on the visual. For example there should be 3 closed in Feb, but the visual isn't showing that. I seems to think that's because the actual date is before the planned date. But, I struggling to find a way aaround.

 

Any help you can provide is much appreciated.

1 ACCEPTED SOLUTION

the better way is to create a date table, and create relationships between each date column to date table's date, then put dates on the x axis and use USERELATIONSHIP function to switch the relationship.

 

View solution in original post

9 REPLIES 9
CNENFRNL
Community Champion
Community Champion

Hi, @Anonymous , you might want to adjust the calculated column sheet1[sOFm]

sOFm = ENDOFMONTH( Sheet1[Planned Date] )

then measures

cumplanned =
COUNTROWS ( FILTER ( ALL ( Sheet1 ), Sheet1[sOFm] <= MAX ( Sheet1[sOFm] ) ) )

===================================

cumactual =
COUNTROWS (
    FILTER (
        ALL ( Sheet1 ),
        Sheet1[Actual Date] <= MAX ( Sheet1[sOFm] )
            && Sheet1[Actual Date] > 0
    )
)

Screenshot 2020-12-11 031628.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Anonymous
Not applicable

@CNENFRNL Thank you for your suggestion. It did improve the issue. But, it is still not showing the 2 that was completed in Feb.

wdx223_Daniel_0-1607656713763.png

 

wdx223_Daniel
Super User
Super User

wdx223_Daniel_0-1607646345676.png

 

Anonymous
Not applicable

Thank you for your help, but I think the numbers are still off based on what I can tell from doing in excel. Aug actual should be 8, its still showing 6

the better way is to create a date table, and create relationships between each date column to date table's date, then put dates on the x axis and use USERELATIONSHIP function to switch the relationship.

 

Hello, can you explain how do it? I have same problem. I have planned dates and completed dates ( actual ) and i have date table. What i need to do? i create relationship between actual dates with date table. what next?

Anonymous
Not applicable

@wdx223_Daniel thank you! the USERELATIONSHIP function solved it along with creating the seperate date table.

Anonymous
Not applicable

@wdx223_Daniel , thank you I will give the userrelationship a try

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.