cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tobz Regular Visitor
Regular Visitor

Change to Value to zero if it does not exist

Hi Team,

 

I need help on this.

 

I create a report using bar chart and matrix (see figure 1) but my challenge now is if select a value from the filter the two charts are no longer aligned. I need how how to manage this even if its a DAX query that sets the value that does not exist to zero so that the filed will not disappear from the charts.

 

Fig 1

 

 

Capture 1.PNGBefore applying filter

 

Fig 2

 Capture 2.PNGAfter applying filter

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
anithat Regular Visitor
Regular Visitor

Re: Change to Value to zero if it does not exist

@tobz

 

Please see the screenshot below. I hope that answers your question. 

 

All you have to do is to click on "Show Items with no data" from the field dropdown

Show Values with no data.png

View solution in original post

5 REPLIES 5
tobz Regular Visitor
Regular Visitor

Change to Value to zero if it does not exist

Hi Team,

 

I need help on this.

 

I create a report using bar chart and matrix (see figure 1) but my challenge now is if select a value from the filter the two charts are no longer aligned. I need how how to manage this even if its a DAX query that sets the value that does not exist to zero so that the filed will not disappear from the charts.

 

Fig 1

 

 

Capture 1.PNGBefore applying filter

 

Fig 2

 Capture 2.PNGAfter applying filter

 

ChrisHaas Established Member
Established Member

Re: Change to Value to zero if it does not exist

add 

+ 0

to the end of your code.  That way, when it evaluates to a blank, it will add 0, and force a 0 to appear.  Then the column won't disappear from your matrix

tobz Regular Visitor
Regular Visitor

Re: Change to Value to zero if it does not exist

It didnt work for me.

Highlighted
anithat Regular Visitor
Regular Visitor

Re: Change to Value to zero if it does not exist

@tobz

 

Please see the screenshot below. I hope that answers your question. 

 

All you have to do is to click on "Show Items with no data" from the field dropdown

Show Values with no data.png

View solution in original post

TD-BI-BNE Frequent Visitor
Frequent Visitor

Re: Change to Value to zero if it does not exist

Brilliant, worked like a charm!  Thanks!

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: 181 members 2,345 guests
Please welcome our newest community members: