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
Dan492813
Helper II
Helper II

Cumulative count of created and completion dates

Hi All, 
 
I am trying to plot a cumulative count of created and complated dates on a graph.
I have the count working:
 
Count of Completed repairs 2 =
CALCULATE (
SUM('Orders view'[Count]),
FILTER (
ALLSELECTED ( 'Orders View' ),
'Orders View'[CompletedDate] <= MAX ( 'Orders View'[CompletedDate] )
))
 
It looks like this:
Capture.PNG
I have done the same for the created dates. 
 
I have plotted them on a graph using a date table as the axis but it is no longer cumulative:
 
Capture 2.PNG
Can anyone help please?
 
Thanks, Dan
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Dan492813 , with date table , you need have formula

 

Count of Completed repairs 2 =
CALCULATE (
SUM('Orders view'[Count]),
FILTER (
ALLSELECTED ( 'Orders View' ),
'Date'[Date] <= MAX ( 'Date'[Date] )
))

 

for other date use userealtionship in first calculate and then use this

example

Count of Created repairs 2 =
CALCULATE (CALCULATE (
SUM('Orders view'[Count]), userelationship(Date[Date], 'Orders view'[date Created]))
FILTER (
ALLSELECTED ( 'Orders View' ),
'Date'[Date] <= MAX ( 'Date'[Date] )
))

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Dan492813 , with date table , you need have formula

 

Count of Completed repairs 2 =
CALCULATE (
SUM('Orders view'[Count]),
FILTER (
ALLSELECTED ( 'Orders View' ),
'Date'[Date] <= MAX ( 'Date'[Date] )
))

 

for other date use userealtionship in first calculate and then use this

example

Count of Created repairs 2 =
CALCULATE (CALCULATE (
SUM('Orders view'[Count]), userelationship(Date[Date], 'Orders view'[date Created]))
FILTER (
ALLSELECTED ( 'Orders View' ),
'Date'[Date] <= MAX ( 'Date'[Date] )
))

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

Any help with this would be great 

I'm getting the error:

"A single value for column 'Date' in table 'Dates' cannot be determind. 

Is this because the dates are in a different table? 

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.