cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jj304 Frequent Visitor
Frequent Visitor

Display zero instead of blank in matrix

Hi,

 

Does anyone know how I can display zeros in the below matrix, there is no data for JobLevel1 Males but my client really wants zeros to display instead of blanks.

My measure is Total_Gender = IF(CALCULATE(COUNTROWS('Data'),'Data'[Type]="Gender")=BLANK(),0,CALCULATE(COUNTROWS('Data'),'Data'[Type]="Gender")),0)

 

Year2018 Total
GenderJobLevel1JobLevel2
Female347
Male 44
Total3811

 

Thanks,

Jennifer

1 ACCEPTED SOLUTION

Accepted Solutions
hthota Member
Member

Re: Display zero instead of blank in matrix

Hi @jj304 Jennifer

Create two dummy columns as given below.

Dax Function:

Joblevel1 Dummy = IF(Sheet1[Joblevl1]=BLANK(),0,Sheet1[Joblevl1])

Joblevel2 Dummy = IF(Sheet1[Joblevel2]=BLANK(),0,Sheet1[Joblevel2])

 

And place this columns in the visual you will get the visual as given below.

jj304.PNG

 

I hope it would help you.

 

 

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Display zero instead of blank in matrix

Perhaps:

 

Total_Gender = IF(ISBLANK(CALCULATE(COUNTROWS('Data'),'Data'[Type]="Gender")),0,CALCULATE(COUNTROWS('Data'),'Data'[Type]="Gender"))

I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

hthota Member
Member

Re: Display zero instead of blank in matrix

Hi @jj304 Jennifer

Create two dummy columns as given below.

Dax Function:

Joblevel1 Dummy = IF(Sheet1[Joblevl1]=BLANK(),0,Sheet1[Joblevl1])

Joblevel2 Dummy = IF(Sheet1[Joblevel2]=BLANK(),0,Sheet1[Joblevel2])

 

And place this columns in the visual you will get the visual as given below.

jj304.PNG

 

I hope it would help you.

 

 

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 57 members 1,211 guests
Please welcome our newest community members: