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

Time intelligent measure - cumulative total with conditons

Hello!

 

I have already grouped dataset by partnumber and ordernumber, with max procure, max assigned and max received.

krishna0_0-1654163297650.png

 

This is a current chart, which simply shows the count of each item per week they are in:

krishna0_1-1654163385991.png

 

What I am trying to achieve is a measure, that takes "procure" and "assigned" dates and counts rows respectively: let's say, that we're looking on week 202214. I want to have a cumulative total of rows, for which "procure" that is LATER so 202215 and further OR blank and in the same time "assigned" is EQUAL or LESS than the current week, so 202214, 202213 etc.

I tried some ways but it does not work as designed. There is probably no case "assigned" later than "procure" in my current dataset. If you have any ideas I would really appreciate it. Here is the workbook I am working on:
https://drive.google.com/file/d/13ILpKAsLYNNhZMGN4OPP0YwglQzP89L2/view?usp=sharing

Best Regards

 

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

@krishna0 
Not sure if this is what you're looking for

1.png2.png3.png

cumulative total = 
CALCULATE ( 
    COUNTROWS ( Sheet1 ), 
    COALESCE ( Sheet1[procure], TODAY ( ) ) > MAX ( 'Calendar'[Date] ), 
    Sheet1[assigned] <= MAX ( 'Calendar'[Date] ),
    REMOVEFILTERS ( 'Calendar' ) 
)

View solution in original post

2 REPLIES 2
krishna0
Helper II
Helper II

This looks very good! Thank you!

tamerj1
Super User
Super User

@krishna0 
Not sure if this is what you're looking for

1.png2.png3.png

cumulative total = 
CALCULATE ( 
    COUNTROWS ( Sheet1 ), 
    COALESCE ( Sheet1[procure], TODAY ( ) ) > MAX ( 'Calendar'[Date] ), 
    Sheet1[assigned] <= MAX ( 'Calendar'[Date] ),
    REMOVEFILTERS ( 'Calendar' ) 
)

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.