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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

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
1 ACCEPTED SOLUTION
Phil_Seamark
Employee
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])
						)
						)

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Phil_Seamark
Employee
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])
						)
						)

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Great! I were failing on the allselect filter...

Now I got the cumulative lines!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.