Forum Discussion

EugenioProlog's avatar
EugenioProlog
Icon for Helper III rankHelper III
1 year ago
Solved

Help with blank/zero values on cohort analysis

I am creating a cohort analysis dashboard where i can view and compare diferent Tiers of clients in the same page. Currently I'm having two problems: 1: I want to display the (0) value when the...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi EugenioProlog 
    Thanks again for confirming the expected triangle logic, that helped shape the final approach. I initially explored using a separate filter like IsLifetimeValid, but in the end, I realized it's not needed if your base cohort measure already limits values based on lifetime logic.

    Instead, I adjusted the main cohort measure like [Cohort] to include this logic directly, for example go though bellow dax.

    Cohort = 
    VAR CurrentLifetime = SELECTEDVALUE(Lifetime[Lifetime])
    VAR MaxLifetime = [Maximo Lifetime]
    RETURN
    IF (NOT(ISBLANK(CurrentLifetime)) && NOT(ISBLANK(MaxLifetime)) && CurrentLifetime <= MaxLifetime, [Subscriptions], BLANK())


    This way, the triangle shape naturally forms, and you don’t need to apply IsLifetimeValid as a separate visual filter.

    Here’s what the final output looks like for me matches what you expected.


    Hope this clears it up and simplifies things further. 
    _________________________________________________________________________________________________________________________
    If this response helps, consider marking it as “Accept as solution” and giving a “kudos” to assist other community members.

    Thank you,
    Akhil.