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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

USERELATIONSHIP not pulling in any results

Hello community. 

 

I find myself back here for some help.

 

I have a table with several date columns, it is connected to a calendar table, and there are multiple connections (1 active and 5 inactive). I want to do a row count and use a different relationship for each date column. It should be the USERELATIONSHIP function, however it returns only 1 value that isn't sorted. 

 

Here is a diagram of my database layout

 

Full database layoutFull database layoutspecific database layoutspecific database layout

 

All of my table connections are one way from the calendar table Above is the full layout and then a layout of the two tables

 

The formula I am using is as follows: 

 

Stewardship - Project Close-Outs - Project Count =

var _totcount =

CALCULATE(DISTINCTCOUNT('CSGC Projects'[project_nu]),
FILTER('CSGC Projects', 'CSGC Projects'[Stewardship - Project Close Out (Bin)] IN {"Met Standard", "Did Not Meet Standard"}),
FILTER('CSGC Projects', 'CSGC Projects'[Most Recent Record] = 1),
USERELATIONSHIP('Calendar Table'[Date], 'CSGC Projects'[Target Date - Stewardship - Project Close Out])
)

return _totcount

 

Here is the result of my calculation

 

Table Results.PNG

 

I have confirmed the following:

  • The date fields that are connecting are the same type of date field;
  • That there are date values in the fields. (there are however blanks)
  • I have also used the TREATAS function and receive a sum but no breakdown

Edit: I did a test: it's because the linking columns are columns that have been added in Power Query, they aren't part of the original data set. Should have any bearing/impact on it? Using a date column that was part of the original data set presents no issues.

 

For reference that Power Query calculation is: Date.AddDays([project_en], 182)

 

Thanks in advance

1 REPLY 1
vanessafvg
Super User
Super User

what would be more useful if is you showed all the columns reliant on the calc in the screenshot.   

ie 

[Stewardship - Project Close Out (Bin)] IN {"Met Standard", "Did Not Meet Standard"}),
FILTER('CSGC Projects', 'CSGC Projects'[Most Recent Record] = 1)

your power query addition should have no bearing.  Do you have time values in the date or is it just date?

 

its always easy to understand the problem if you are able to add your pbix, very difficult to diagnose with what you have given here





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.