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
reaaeis
Regular Visitor

Hierarchical cumulative line chart values not accumulating

I am attempting to create a line chart with cumlative values that works across a hierarchy (year/qtr/week). It works when viewed directly at the week level--directly being drilled down via the two straight arrows. When viewed in any other way it displays non cumulative values. This is any hiearchical level or directly at  the year or qtr level. Here is the Dax.

 

cncp Count of Case Number in Week =
CALCULATE(
    COUNT('cpnp'[Case Number]),
    FILTER(
        ALLSELECTED('Calendar'[WeekSeqNoInYear]),
        ISONORAFTER('Calendar'[WeekSeqNoInYear], MAX('Calendar'[WeekSeqNoInYear]), DESC)
    )
)
1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @reaaeis 

Create measure

clc measure = IF(NOT(ISBLANK(COUNT('Table'[case number]))),CALCULATE(COUNT('Table'[case number]),FILTER(ALL('calendar'),'calendar'[Date]<=MAX('calendar'[Date]))))

Capture21.JPGCapture22.JPG


Best Regards
Maggie
Community Support Team _ Maggie Li
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

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @reaaeis 

Create measure

clc measure = IF(NOT(ISBLANK(COUNT('Table'[case number]))),CALCULATE(COUNT('Table'[case number]),FILTER(ALL('calendar'),'calendar'[Date]<=MAX('calendar'[Date]))))

Capture21.JPGCapture22.JPG


Best Regards
Maggie
Community Support Team _ Maggie 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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.