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.
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)?
Solved! Go to 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
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |