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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.