DAX to Replace a value in matrix with blank based on row value

I have a matrix that does not show the columns when there is no data.

I modified my SQL to bring in a zero for the columns not having any events. I am using it as a placeholder so that I can see all possible columns. See the Excel data.

The row returns a 1 instead of 0 in the matrix because 0 is seen as an id and it gets counted

Donation Count = 
DISTINCTCOUNT('Demo Event Flow'[donor_id])

I’ve tried the methods of replacing the value with 0 depending on the row context.

Donation Count Offset = 
IF('Demo Event Flow'[Current Flow ID]= 0, 0, 'Demo Event Flow'[Donation Count])`   

I tried replacing 0 with blank but lost the column again

Donation Count Offset to Blank = 
IF('Demo Event Flow'[Donation Count Offset]= 0, BLANK(), 'Demo Event Flow'[Donation Count])

I have worked on this for two days.

Demo Matrix.docx (53.9 KB)
Demo Event Flow.pbix (31.6 KB)
Demo Event Flow.xlsx (10.5 KB)
Demo Events.xlsx (9.1 KB)

Before I dig too deep into this, does this article help at all?

1 Like

Unfortunately, that does not work

You mentioned you modified your SQL to try and flag certain items to show up; have you tried reverting those modifications and using the method in the article?

Hi @LASHBURN, noticed that we have not received a response from you on @Zherkezhi clarification. Just wanted to check if you still need further help on this query. Thanks

Hi @LASHBURN, it’s been a while since we got a response from you. In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.

Hi @LASHBURN, due to inactivity, a response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box.