The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 there is no longer any client on that cohort (see pic 1)
2: I want to display the months with zeros where i dont have any new client. See pic 2
Below is attached my pbix file.
https://drive.google.com/file/d/1frnBF0q_iSchNtfZoQGGpthfLihic9gy/view?usp=sharing
Solved! Go to Solution.
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.
Hi @EugenioProlog ,
Since we haven’t heard back from you, we’ll proceed to close this thread for now. If you continue to experience issues or have any additional questions, feel free to start a new thread in the Microsoft Fabric Community Forum. We’re always here to help and happy to support you.
Regards,
Akhil.
Hi @EugenioProlog ,
Just looping back one last time to check if everything's good on your end. Let me know if you need any final support happy to assist if anything’s still open.
Regards,
Akhil.
Hi @EugenioProlog ,
Just wanted to follow up and confirm that everything has been wrapped up on this. Please let me know if there’s anything pending from my side. Please feel free to reach out Microsoft fabric community forum.
Regards,
Akhil.
Hey @EugenioProlog
Just wanted to check in did the updated cohort logic and triangle layout work out for your use case? It looks like things aligned well based on your earlier feedback, but let me know if you're seeing any unexpected edge cases or need help tweaking the measure further. Happy to help if you're refining it more or layering in additional cohort logic.
Regards,
Akhil.
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.
@EugenioProlog Sometimes you can just use +0, otherwise, simply include a check that if it is BLANK then return 0
I tried with 0+ and Blank.. But then it looks very ugly. I want it to still look like a triangle shape
@EugenioProlog Yeah, I was afraid of that. Is there any other criteria that you can add as a check? For example, if the first Date in the chart is January 2024 and you have 17 values then each subsequent month should be one less, 16, 15, 14, etc. That's kind of how it looks in the chart. If you do that, then you could either add that additional check into your measure or perhaps write a Complex Selector. The Complex Selector - Microsoft Fabric Community
"if the first Date in the chart is January 2024 and you have 17 values then each subsequent month should be one less, 16, 15, 14, etc. "
Yes, that's exactly it. I managed to find a function to display the zeros correctly. Now I just need to hide the Lifetime columns that show indefinetly.
Do you know a way to do that?
I tried adding a filter metric as a boolean but it shows all value as true.
IsLifetimeValid =
VAR CurrentLifetime = SELECTEDVALUE(Lifetime[Lifetime])
RETURN
IF(
NOT(ISBLANK(CurrentLifetime)) && CurrentLifetime <= [Maximo Lifetime],
TRUE,
FALSE
)
My pbix is attached on the same link of the first post.