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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Syndicate_Admin
Administrator
Administrator

display zeros in line graph

Hello everyone, I have the following case.
I need to visualize to zero the records that do not appear in the fact table, of the hours that the employee dedicates to the project.
But when I perform that measurement, it shows me all the projects that I have in the data model and does not filter me according to the employee I have selected, and I do not know how to do it to show only the projects that belong to that employee.
if you can help me, I thank you.

hvm_0-1636030485916.png

This is the model.

hvm_1-1636030526328.png

if you see in the matrix on the right, the projects in which the employee participates, there are 3.
However, to my extent, it takes out all the projects I have in the model.
The measurement I'm using to paint the data to zero is as follows.

hvm_2-1636030690322.png

The data is very basic.
Calendar table.

hvm_3-1636030733603.png

Employees table.

hvm_4-1636030764758.png

The FACT table, which stores the hours spent per day on the project.

hvm_5-1636030792972.png

and finally the projects table, which has the project data.

hvm_6-1636030853478.png

It is an example model, or to share the info with you.
Greetings I thank you for any help.

I don't like how to share pbix, or excel, I'm new to this. if you tell me I share it.
Thanks again.

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

Did these records really exist in your tables? If they are not included in your table records, you need to use a calendar table with Dax expression to expand the records.
In addition, zero value will auto removed in the chart and other graphs visualization. If you want to display zero value records, please use table visuals instead.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
lbendlin
Super User
Super User

Usually in such scenarios (when you want to show data that is not there) you need to create a cross join between your dates table and your employees table, and then use measures to calculate if there's a value at the intersection or a zero.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.