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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
jonasdedual_SP
Frequent Visitor

Column Chart showing Legend with no Data

Hi There

 

I hope someone can help me.

 

I have a column chart that is showing employee working hour data.

Unfortuantelly, it is also showing in the legend month that is outside my slicer filter. It is also showing data in the future that is not even in the table.

jonasdedual_SP_1-1725603935662.png

 

The Table is a Crossjoin:

 

EmployeeIncidentTable = 
CROSSJOIN ( DateTable, J_employees )

 

 

jonasdedual_SP_3-1725604061927.png

 

Date Table:

 

DateTable = 
VAR StartDate = TODAY() - 730
VAR EndDate = TODAY()
RETURN 
ADDCOLUMNS (
    CALENDAR ( StartDate, EndDate ),
    "Year", YEAR ( [Date] ),
    "Month", MONTH ( [Date] ),
    "Day", DAY ( [Date] ),
    "MonthName", FORMAT([Date], "MMMM"),
    "Weekday", WEEKDAY([Date], 2),
    "IsWorkday", IF(WEEKDAY([Date], 2) <= 5, 1, 0)
)

 

 

The only thing that seems to work is when setting the slicer to year:

jonasdedual_SP_4-1725604297143.png

 

But changing that to Month doesnt work:

 

Any Idea how to fix taht?

 

3 REPLIES 3
jonasdedual_SP
Frequent Visitor

The Problem is that I want the combination between employee und date. so each employee shoud have for each day one row. However I fugured out that I only have this issue with measures but not with calculated columns. I will try to use calculted columns instead.

Anonymous
Not applicable

Hi, @jonasdedual_SP 

Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!

 

Best Regards

Yongkang Hua

Ritaf1983
Super User
Super User

Hi @jonasdedual_SP 

My recommendation is to create a regular relationship between the tables instead of using the CROSSJOIN function.

The CROSSJOIN essentially generates all possible combinations of dates and employees, which could be why you're seeing months outside your filter range and even future data that doesn’t exist in the table.

By creating a proper relationship between the DateTable and the employee data (using, for example, EmployeeID and the Date), Power BI will automatically filter the data correctly according to your slicer, whether you're filtering by year or month.
For example, I have a relationship between orders and dates :

Ritaf1983_0-1725605685745.png

 

And I want to see sales by countries:

Ritaf1983_1-1725605802705.png

In some months there are no sales in one of the countries...
In these periods I will see only the existing countries sales :

Ritaf1983_2-1725605890522.png

The pbix with the example is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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