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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
macinrr
Regular Visitor

Running total in matrix visual

Hi, I am trying to build a time machine for the project execution. What that means?

1. I have a table named Releases changelog. In the table I have columns: Key, Changed datetime, Release assigned.
Over time the key may jump from one release to another, and the timestamp allows to catch each of those steps.

2. I also have a Releaes table, with columns: name, name ordered. For each name, there is an ordered value so sorting is easier then. Mind, for this table, I can have multiple names different names which map to the one ordered value.

3. I have a date changed table, which is just a calendar table. I use it as a slicer so I can control what change dates I allow to use

Relationships are:

macinrr_3-1703902589634.png

 

Where the active connection is based on Release name new = name

 

I want to build a visual like this (I already managed to achieve something close to what I need, but it is problematic - more on this later as solving those problems is a core of my question) which will show me progress of tickets closed aggregated at the epic level as well as initiative level. 

macinrr_0-1703901969588.png

 

The whole idea is that I control date changed through slicer and that means, my report should accept the newest date changed release name from release changelog, but it should not be larger than that selected date changed value. This way, I should take the value of a release assignment at the selected time. 

 

I managed to create following measures

1. to find out the latest status

 

Latest Release Per Key = 
CALCULATE(
    LOOKUPVALUE(
        'Releases changelog'[Release name new ordered],
        'Releases changelog'[Key], SELECTEDVALUE('Releases changelog'[Key]),
        'Releases changelog'[Changed date], 
        MAX('Releases changelog'[Changed date])
    ),
    ALLEXCEPT('Releases changelog', 'Releases changelog'[Key]),
    ALLSELECTED('Changed date'[Date])
)

 

2. to calculate the progress percentage

 

Cumulative Progress Percentage latest release = 
VAR CurrentRelease = MAX('Releases'[Release name ordered]) // Get the current release based on the matrix column context
VAR CumulativeCount =
    CALCULATE(
        DISTINCTCOUNT('Releases changelog'[Key]), 
        FILTER(
            'Releases changelog',
            'Releases changelog'[Release name new ordered] <= CurrentRelease
        ),
        VALUES('Releases changelog'[Initiative summary]) // Keep the context of the current Epic
    )

VAR TotalCount = 
    CALCULATE(
        DISTINCTCOUNT('Releases changelog'[Key]),
        All('Releases'[Release name ordered]), // Remove the filter from the release column
        VALUES('Releases changelog'[Initiative summary]) // Keep the context of the current Epic
    )

VAR Div = DIVIDE(CumulativeCount, TotalCount, 0)
RETURN Div
//IF(ISBLANK(Div), 0, Div)

 

this one gives me following view

macinrr_1-1703902270382.png

Now I need the final measure to have a desired view but it is not working

 

Cumulative Progress Sum Latest Release = 
VAR CurrentRelease = MAX('Releases'[Release name ordered])
VAR CumulativeCount = 
    CALCULATE(
        [Cumulative Progress Percentage latest release],
        FILTER(
            ALLSELECTED('Releases'),
            'Releases'[Release name ordered] <= CurrentRelease
        )
    )
RETURN
CumulativeCount

 

which produces following results

macinrr_2-1703902421567.png

 

I've run out of ideas what am I doing wrong. The problem with the results is that often there are partially finished elements at the sub level however the calculation returns the 100%.. see the colored image...

2 REPLIES 2
macinrr
Regular Visitor

I think I am missing something conceptually. Let's simplify things

I have this model

macinrr_0-1704011113572.png

 

My changelog data are

Release nameKeyDate updated
2024 January-February       DW-200 10.10.2023 00:00
2024 January-FebruaryDW-300 11.10.2023 00:00
2024 January-FebruaryDW-40010.10.2023 00:00
2024 July-AugustDW-10005.12.2023 00:00
2024 March-AprilDW-20001.12.2023 00:00
2024 March-AprilDW-30001.12.2023 00:00
2024 March-AprilDW-40002.12.2023 00:00
2024 May-JuneDW-20015.10.2023 00:00
2024 May-JuneDW-30019.10.2023 00:00
2024 May-JuneDW-40015.10.2023 00:00
2024 September-OctoberDW-10015.10.2023 00:00



The Issues table consists of unique keys and unique release table consists of unique releases
Now, I think I need indicate (true, false) those changelog entries that the change date is lower than the date selected in a slicer and the change date is highest per key


Update: This does the job I think

Check Latest Update By Key = 
VAR LatestDate = CALCULATE(
                    MAX('Release changelog'[Date updated]), 
                    ALLEXCEPT('Release changelog', 'Release changelog'[Key]),
                    'Release changelog'[Date updated] <= MAX('Date'[Date])
                )
RETURN
IF(
    LatestDate = MAX('Release changelog'[Date updated]), 
    1, 
    0
)
lbendlin
Super User
Super User

You seem to be pretty far along already. Read about EVALUATEANDLOG, install the DAXDebugOutput app, and troubleshoot your measures.  Probably somewhere a wrong filter context.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors