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
jtomczyk
Helper I
Helper I

Plot two cumulative distinct count that works with slicers

Hi,

I would like to compare number of all projects to the projects that require service intervention.
have two queries "Service" and "Orders". Inside each I have those columns
1. Orders  
- ProjectNumber
- CreationDate

- Product
- ProductSoftware
- other

jtomczyk_2-1643978182037.png

2. Service
- ProjectNumber
- CreationDate
- Reason

jtomczyk_4-1643978447897.png

I would like to plot cumulative distinct counts of the projects and cumulative distinct count of the projects with service intervention
Something like that

jtomczyk_1-1643977845078.png

 

 

Remarks
- We need to be able to use all slicers (especialy "Product", "ProductSoftware" and "Reason")

- It is necesery that projects with service intervention are distinct, as we can have several intervention for one project but we would like to see only the sum of the problematic projects based on the slicers

 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @jtomczyk ,

 

According to your description, the products that appear in the service table are marked and added up separately, is that what you mean? I think I need to create a separate date table, I did a test reference as follows:

M_1 =
CALCULATE (
    COUNTROWS ( Orders ),
    ALL ( Orders ),
    Orders[CreationDate] <= MIN ( Orders[CreationDate] )
)

M_2 =
CALCULATE (
    COUNTROWS ( Service ),
    ALL ( Service ),
    Service[CreationDate] <= MIN ( Service[CreationDate] )
)

vhenrykmstf_0-1644392204260.png

 


If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your feedback.


Best Regards,
Henry


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
v-henryk-mstf
Community Support
Community Support

Hi @jtomczyk ,

 

According to your description, the products that appear in the service table are marked and added up separately, is that what you mean? I think I need to create a separate date table, I did a test reference as follows:

M_1 =
CALCULATE (
    COUNTROWS ( Orders ),
    ALL ( Orders ),
    Orders[CreationDate] <= MIN ( Orders[CreationDate] )
)

M_2 =
CALCULATE (
    COUNTROWS ( Service ),
    ALL ( Service ),
    Service[CreationDate] <= MIN ( Service[CreationDate] )
)

vhenrykmstf_0-1644392204260.png

 


If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your feedback.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@jtomczyk , You need to have common date Table. And one additional copy of project table as diemsion, which will join with project and service.

 

Date will also join with project and service

 

Then you can create measure using count from each fact

Cumm project= CALCULATE(Count(project[project]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))

 

 

Cumm service= CALCULATE(Count(service[project]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))

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.