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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PetyrBaelish
Resolver III
Resolver III

Values on visualisation ignoring the axis

I have 2 tables as follows:

 

Activity table (from audit logs):

Activity Time (the date/time of an activity)

Year (The Year of activity time)

YearMonth (The year & month of activity time in the format 2019-03)

YearMonthDay (The year, month & day of activity time in the format 2019-03-20)

Username (a person's login)

 

User table:

Username (a person's login)

DepartmentName (a person's department)

 

The tables have a relationship on the username column - a many to one relationship: Activity (many) - User (one)

 

I have a table visualisation, which shows the results I would expect - it has 2 columns: YearMonthDate, DepartmentName (DepartmentName is set to Don't summarize). From this table I can see the departments that have activities on each date - I manually count the rows and I can see:

on 2019-03-20 there were 20 departments

on 2019-03-21 there were 18 departments

on 2019-03-22 there were 15 departments

 

This is as I expected, but when I try to summarize the DepartmentName column using either Count or Count (Distinct) the values don't add up as before (20, 18, 15) - it shows 50 for every date (there are 50 departments in total).

 

The problem I have here is I want the data on a line chart, I add the Year, YearMonth and YearMonthDay columns to the axis (with the intention of drilling down), I add DepartmentName to Values (set it to Count Distinct) - Don't summarize is not available; this results in every YearMonthDay showing 50 departments, but what I need are the figures as I listed above (20, 18, 15). I'm not sure why, when the count function is being used, the dates are being ignored (technically speaking they're not dates - they're text formatted to look like dates)?

1 ACCEPTED SOLUTION

The problem was that the relationhip was not bi-directional - I changed the relationship's cross filter direction to Both and this has solved the problem

View solution in original post

2 REPLIES 2
HotChilli
Super User
Super User

It'll be easier to solve this if you post a link to your pbix so we can have a look at it.

 

While you do this, check the data types for your columns, especially the yearmonthday

The problem was that the relationhip was not bi-directional - I changed the relationship's cross filter direction to Both and this has solved the problem

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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