Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
hello everyone!
i have created a cohort for (total users who canceled and returned) using a matrix visual as follows:
rows: cancelation month
columns : difference between cancelation month and retention month
values: [total users]
as you can notice the rows represents current month+1
ex. if current month is obtober2021 :
0= obtober2021
1= november2021
2= december2021
and so on
the thing is , when month is after the current month , ex 'December2021 and not reached yet , i want the value to show blank instead of zero and only show zero when month is before current month
Example: if im in october2021, and November2021 value is zero , i want to see 0 for november2021 and Blank for december2021 because it's not reached yet
note that in order to get zeros in the matrix , i had to join with another table that had index column (using generate_series)
because when i used the index column inside my table i couldnt get any zeros and it was only blanks wether its before current month or after
so, what i want to get is : zero when month is before current month and blank if it's after current month
appreaciate the help!
Solved! Go to Solution.
Hi,
According to your description and sample picture, I think you can simply change your DAX formula like this to achieve your needs:
total users =
var _value=
CALCULATE(DISTINCTCOUNT(table[user_id]))
return
if(_value=blank(),0,_value)
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @lawada
Can you share a sample of your PBIX file after removing sensetive data?
Or if you use any measure share codes with us?
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
i have used only one measure to count total users :
Hi,
According to your description and sample picture, I think you can simply change your DAX formula like this to achieve your needs:
total users =
var _value=
CALCULATE(DISTINCTCOUNT(table[user_id]))
return
if(_value=blank(),0,_value)
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.