cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

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

Accepted Solutions

Re: Values on visualisation ignoring the axis

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

2 REPLIES 2
HotChilli Established Member
Established Member

Re: Values on visualisation ignoring the axis

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

Re: Values on visualisation ignoring the axis

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