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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
amirghaderi
Helper IV
Helper IV

Stop Cumulative count curve

Hi,

I have seen a lot post on this subject. but, could not get a clear answer.

I have a measure which count a column record, there is a cumulative count measure which I want to stop once it reaches its Maximum and not to continue as a flat line.

Data table as below:

CriteriaDate
MDR Issue DateFriday, 19 June 2020
MDR Planned Finish DateMonday, 8 June 2020
MDR Issue DateFriday, 26 June 2020
MDR Planned Finish DateMonday, 8 June 2020
MDR Issue DateFriday, 5 June 2020
MDR Planned Finish DateMonday, 8 June 2020
MDR Issue DateFriday, 26 June 2020
MDR Planned Finish DateThursday, 11 June 2020
MDR Issue DateMonday, 15 June 2020
MDR Planned Finish DateTuesday, 30 June 2020
MDR Issue DateFriday, 3 July 2020
MDR Planned Finish DateThursday, 11 June 2020
MDR Issue DateMonday, 15 June 2020

 

Issued Count =

    calculate(COUNT('t_MDR2'[Date]),t_MDR2[Criteria] = "MDR Issue Date")
 
Issued **bleep**. =
CALCULATE(
    [Issued Count],
FILTER(
        ALLSELECTED('t_MDR2'),
        't_MDR2'[Date]<= MAX(t_MDR2[Date])))
 
 
Capture.JPG
11 REPLIES 11
amirghaderi
Helper IV
Helper IV

If you look at the graph, the green curve has been extended as a flat line once it has reached its maximum value. i want that to finish once it reaches its max value

amirghaderi_0-1595571243514.png

 

danextian
Super User
Super User

Hi @amirghaderi ,


Are you using a separate a date field from a separate Date table in  your graph? You can modify your formula  a bit so the value only shows when ony when the date from a separate table is <= the date from your fact table. Try this.

Issued **bleep**. =
IF (
    LASTDATE ( Dates[Date] )
        <= CALCULATE ( MAX ( 't_MDR2'[Date] ), ALL ( 't_MDR2' ) ),
    CALCULATE (
        [Issued Count],
        FILTER ( ALLSELECTED ( 't_MDR2' ), 't_MDR2'[Date] <= MAX ( t_MDR2[Date] ) )
    )
)

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi, Yes I have a table for dates.

I changed the measure as per your note and no chnage to the output.

Hi @amirghaderi ,

I have attached  sample pbix with a formula similar to what i previously posted.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
amitchandak
Super User
Super User

@amirghaderi ,The information you have provided is not making the problem clear to me. Can you please explain with...



Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi, thanks for the response. getting closer now. 

I dont have the option to attached the file.

I think I cant get the same result since my count data is measure.

So, assume in your file the value table has three columns, as below. I want to count the cumulative value of "Issued" and "planned" as two curve over the date

DocumentCriteriaDate
AIssuedFriday, 19 June 2020
BPlannedMonday, 8 June 2020
CIssuedFriday, 26 June 2020
DIssuedMonday, 8 June 2020
EPlannedFriday, 5 June 2020
FIssuedMonday, 8 June 2020
GIssuedFriday, 26 June 2020
HIssuedThursday, 11 June 2020
IPlannedMonday, 15 June 2020
JPlannedTuesday, 30 June 2020
KPlannedFriday, 3 July 2020
LPlannedThursday, 11 June 2020
MIssuedMonday, 15 June 2020

Hi @amirghaderi ,

Try like this measure:

Issued Count = 
IF (
    SELECTEDVALUE ( 'Table'[Date] )
        <= CALCULATE (
            MAX ( 'Table'[Date] ),
            FILTER ( ALL ( 'Table' ), 'Table'[Criteria] = "Issued" )
        ),
    CALCULATE (
        COUNT ( 'Table'[Date] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date] <= MAX ( 'Table'[Date] )
                && 'Table'[Criteria] = "Issued"
        )
    )
)

date.png

 

Attached my sample file that hopes to help you: Stop Cumulative count curve.pbix

 

Best Regards,
Yingjie Li

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

Hi,

Still the same issue as below:

 

amirghaderi_0-1595817190722.png

 

Hi @amirghaderi ,

Could you please share a sample file for further discussion? Please remember to replace the sensitive information when sharing sample file.

 

Best Regards,
Yingjie Li

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

 

Hi,

How can I attached PBI file? I cant find any attachment option.

Hi @amirghaderi ,

You can upload the sample file to a place where you can store files like Onedrive for Business etc. and share the file link.

share link.png

 

Best Regards,
Yingjie Li

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

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.