Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
stillgull
Frequent Visitor

Show data labels for 0 blanks with bidirectional cross filter relationship

I have a clustered column chart visual to show how often tickets are created (new) and closed over the last 3 months. My visual has data labels on and I need to keep 0's displayed because sometimes activity is sparce and without 0's the visual would be bare and confusing. 

 

stillgull_6-1704785570053.png


After hours of trial and error, I have FINALLY gotten the 0's to always display. I did this by creating a "Last3Months" table that has 0 placeholders for the otherwise blank categories for those months. It's more or less a 3 month date table that has been joined with my "Tickets" fact table via a full outer join so that I can have an open and close row for each date. The visual is then using sum of "Flag" column for the bars.

ex of Last3Months:

Date

 

Category

 

Action No

 

Flag

1/10/2023

 

New

 

null

 

0

1/10/2023

 

Closed

 

null

 

0

2/10/2023

 

New

 

null

 

0

2/10/2023

 

Closed

 

null

 

0

3/10/2023

 

New

 

ABC1

 

1

3/10/2023

 

New

 

ABC2

 

1

3/10/2023

 

Closed

 

null

 

0

4/10/2023

 

New

 

ABC3

 

1

4/10/2023

 

Closed

 

null

 

0


"Action No" is how all of my tables relate to one another (Red in data model pic)

 
Simplified ex of my data model:

stillgull_5-1704785541787.png

 

Now my problem is I am trying to have a slicer for the users to filter my visual by "Branch", "Sponsor", and "Owner" (Green in data model pic) but the 0's only display when the cross filter direction is single and flowing from my child table into the parent table. If I make the cross filter direction double I am able to use the slicer but the 0's disapear from the data labels. 

 

stillgull_0-1704786374228.png


Is it my data model that needs to be fixed or do I need a better method of getting my totals for my visual? 

Any ideas would help and would be greatly appreciated! Thanks all!

2 ACCEPTED SOLUTIONS
VijayP
Super User
Super User

@stillgull  Technically you should avoid using many to many relations in Power BI as they create ambiguity




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


View solution in original post

Thanks @VijayP for your comment! This pushed me in the right direction.

stillgull_0-1704934823985.png


For anyone interested in more details into how I solved this, I ended up taking @VijayP's advice and removed the many:many relationship between my "Last3Months" and "Tickets" tables by creating a static 3 month calendar in between the two tables. By not using "Action No" in this relationship I was able to keep the 0's visisble in my clustered column chart visual.  

I then ran into an issue with the Owner, Sponsor, and Branch slicers not filtering my visual. To fix the silcers, I created addittional relationships between the "Owner" and "Sponsor" tables with single flow direction. For branch, I had to remove Branch from the "Tickets" table so that "Last3Months" could remain removed from it's filter direction to keep 0's intact. I gave Branch it's own table and made the same single flow relationship to "Last3Months" as I did with "Owners" and "Sponsors". 

TLDR; it was the cross filter direction to solve the slicers issue and it was removing the many:many and not using the Action No in the relationship to solve the 0's

View solution in original post

2 REPLIES 2
VijayP
Super User
Super User

@stillgull  Technically you should avoid using many to many relations in Power BI as they create ambiguity




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Thanks @VijayP for your comment! This pushed me in the right direction.

stillgull_0-1704934823985.png


For anyone interested in more details into how I solved this, I ended up taking @VijayP's advice and removed the many:many relationship between my "Last3Months" and "Tickets" tables by creating a static 3 month calendar in between the two tables. By not using "Action No" in this relationship I was able to keep the 0's visisble in my clustered column chart visual.  

I then ran into an issue with the Owner, Sponsor, and Branch slicers not filtering my visual. To fix the silcers, I created addittional relationships between the "Owner" and "Sponsor" tables with single flow direction. For branch, I had to remove Branch from the "Tickets" table so that "Last3Months" could remain removed from it's filter direction to keep 0's intact. I gave Branch it's own table and made the same single flow relationship to "Last3Months" as I did with "Owners" and "Sponsors". 

TLDR; it was the cross filter direction to solve the slicers issue and it was removing the many:many and not using the Action No in the relationship to solve the 0's

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.