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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
mganapathy2
Frequent Visitor

Show category value as 0 even if there is no data in table

I have a table with values as Blue,Red,Green under the column Colours

I want display the value Black but this Black value is not available under the column Colours  in the table

 

I am using Power BI desktop to display the above in chart like below. Currently it display only for available values 

How do I display for the value Black as 0 even though if it is not available in the table Colours column

 

Blue 100

Black 0

Red  75

Green 67

 

Please let me know how to thi sin power bi 

3 REPLIES 3
mganapathy2
Frequent Visitor

Hi prateekraina,

 

I am looking to create on the fly without creating a table for Black

 

like hard code the value and check the count to display .

IN SSRS we do like =IIF( field1= 'Black', 'Black : & 'count(field1),'Black : & 0)

Please let me know

Currently I do not want an entry inside the table.,am looking for an formula to check if that value exists  on the fly and isplay th e count on the fly.

 

v-jiascu-msft
Microsoft Employee
Microsoft Employee

@mganapathy2

 

Hi,

 

It seems that you can’t add Black into table directly. So you need two tables.

1. Create a table for black: Table2.

Colours   value

Black        0

 

2. Create a table for all colours.

 

ColourTable =
DISTINCT ( UNION ( VALUES ( Table1[Colours] ), VALUES ( Table2[Colours] ) ) )

3. Establish relationship.

4. Create report.

Show category value as 0 even if there is no data in table.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors