Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Cumulative Distinct Count and Slicer

Hello,

 

I am running circles with this:

 

Need to do a cumulative distinc count  ( task ) So that I can play two cumulative line charts.

 

Line A - Cumulative Task by start date ( started tasks)

Line B - Cumulative task by finish date (closed tasks)

 

After that I must be able to apply slicers and get Lines A and B based on slicer settings (by department and employee).

 

I have a calendar table which is link to this table by Finish Date (I got other reports taht need this link).

 

thanks!

TaskDepartmentEmployeeStart dateFinish Date
1AJay01/01/201730/03/2017
2AJohn10/01/201715/01/2017
2BKaty10/01/201715/01/2017
2BVivi10/01/201715/01/2017
5CBob05/02/201715/02/2017
6AJay28/02/201715/03/2017
7CBob30/03/201715/06/2017
7BVivi30/03/201715/06/2017
9AJohn04/04/201715/06/2017
10AJohn01/05/201701/04/2017
10AJay01/05/201701/04/2017
12BKaty01/06/201710/06/2017
13BVivi15/06/201710/06/2017
14BVivi15/05/201710/06/2017
14CBob15/05/201710/06/2017
14CCris15/05/201710/06/2017
  • Hi Anonymous

     

    I think these calculated measures might be close...

     

    Cumulative Task by Start Date = 
    			CALCULATE(
    				DISTINCTCOUNT('Table1'[Task]),
    				FILTER(
    						ALLSELECTED('Table1'),
    						'Table1'[Start date]<=MAX('Dates'[Date])
    						)
    						)

    and

     

    Cumulative Task by Finish Date = 
    			CALCULATE(
    				DISTINCTCOUNT('Table1'[Task]),
    				FILTER(
    						ALLSELECTED('Table1'),
    						'Table1'[Finish Date]<=MAX('Dates'[Date])
    						)
    						)

     

2 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous

     

    I think these calculated measures might be close...

     

    Cumulative Task by Start Date = 
    			CALCULATE(
    				DISTINCTCOUNT('Table1'[Task]),
    				FILTER(
    						ALLSELECTED('Table1'),
    						'Table1'[Start date]<=MAX('Dates'[Date])
    						)
    						)

    and

     

    Cumulative Task by Finish Date = 
    			CALCULATE(
    				DISTINCTCOUNT('Table1'[Task]),
    				FILTER(
    						ALLSELECTED('Table1'),
    						'Table1'[Finish Date]<=MAX('Dates'[Date])
    						)
    						)

     

    • Anonymous's avatar
      Anonymous
      Not applicable
      Great! I were failing on the allselect filter...

      Now I got the cumulative lines!