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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
PowerBIWhat
Helper I
Helper I

USERELATONSHIP help

Hi,

 

I have created a measure that looks like

 

Measure = CALCULATE(
COUNT('Product Schedule'[Product ID]),
USERELATIONSHIP('Product Schedule'[Shipping date],'Date table'[FullDate])
)
 
I'm using it in a report page with many visuals all filtered on Full date which I have as a slicer for the user to change. I want the measure to count the product id's based on the full date selected. There is another required relationship which is why I need the USERELATIONSHIP to do this.
 
The problem I have is that when I filter on a full date, it only filters items that were shipped on the first of the filtered month rather than what I want which is all shipped items for the filtered month.
 
Thanks in advance
 
1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @PowerBIWhat ,

According to your description, I create a sample, the relationship of Shipping date and FullDate is inactive.

vkalyjmsft_0-1638346261173.png

 

vkalyjmsft_1-1638346261175.png

This is the measure code:

Measure = CALCULATE(
COUNT('Product Schedule'[Product ID]),
USERELATIONSHIP('Product Schedule'[Shipping date],'Date table'[FullDate])
)

When I don’t put measure into the product visual, it only show the first product as you say.

vkalyjmsft_0-1638786394288.png

 

 

When I put them in the same visual, it get the correct result, I think it’s because the relationship is only active with the measure, so it has to be putted in.

vkalyjmsft_3-1638346261179.png

I attach my sample below for reference.

Best Regards,
Community Support Team _ kalyj

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

View solution in original post

3 REPLIES 3
v-yanjiang-msft
Community Support
Community Support

Hi @PowerBIWhat ,

According to your description, I create a sample, the relationship of Shipping date and FullDate is inactive.

vkalyjmsft_0-1638346261173.png

 

vkalyjmsft_1-1638346261175.png

This is the measure code:

Measure = CALCULATE(
COUNT('Product Schedule'[Product ID]),
USERELATIONSHIP('Product Schedule'[Shipping date],'Date table'[FullDate])
)

When I don’t put measure into the product visual, it only show the first product as you say.

vkalyjmsft_0-1638786394288.png

 

 

When I put them in the same visual, it get the correct result, I think it’s because the relationship is only active with the measure, so it has to be putted in.

vkalyjmsft_3-1638346261179.png

I attach my sample below for reference.

Best Regards,
Community Support Team _ kalyj

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

mh2587
Super User
Super User

CALCULATE(count([product id]), USERELATIONSHIP(productschedule[shipping date], Date table[FullDate]))


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



This didn't work. Does it make a difference using only the column name in the count?

That is the only difference I could spot. Unless I'm being blind.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors