Another "Totals Not Correct" Scenario

Hi,

I’ve reviewed very comparable problems and their solutions including this one here:

Unfortunately, I can’t quite translate either the “SUMX (SUMMARIZE …” logic or the HASONEFILTER logic to my DAX Measure.

I only want to get the latest data in the source list, depending on how far I have drilled down/up within a matrix visual. I’ve been using the following measure in order to get this behavior:

Latest Critical Item = LASTNONBLANKVALUE(ExecMetrics[Critical Items Past SLA], MAX(ExecMetrics[Critical Items Past SLA]))

The two rows are correct at any level, but the totals are not.

I’d appreciate hearing how you would solve this problem.

Thank you,
Kevin

Joel - DataChamp Upload.pbix (1.8 MB)

Hi @kkieger,

Your measure is doing exactly what you are telling it to do. LASTNONBLANK or LASTNONBLANKVALUE does not SUM up totals, it simply gives you the last known value.

Here is solution I came up with:

Last Critical Item = 
VAR NonProd = CALCULATE (
    LASTNONBLANK ( ExecMetrics[Critical Items Past SLA], 0 ),
    FILTER ( ExecMetrics, ExecMetrics[Tags] = "Non-Prod" )
) 
VAR Production = CALCULATE (
    LASTNONBLANK ( ExecMetrics[Critical Items Past SLA], 0 ),
    FILTER ( ExecMetrics, ExecMetrics[Tags] = "Production" )
) 
VAR Tags = SELECTEDVALUE ( ExecMetrics[Tags] ) 
RETURN SWITCH (
    TRUE (),
    Tags = "Non-Prod", NonProd,
    Tags = "Production", Production,
    NonProd + Production
)

EDNA Jarrett- DataChamp Upload.pbix (1.8 MB)

Thanks
Jarrett

1 Like

Hi @kkieger, did the response provided by @JarrettM help you solve your query? If not, how far did you get, and what kind of help you need further?

Thank you