user248

New Member
Joined
Jul 24, 2021
Messages
2
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello everyone,

I am new to DAX and Power Pivot, I apologize in advance if there is a similar thread I did not see. I am using Excel 2016, I need to use USERELATIONSHIP in the CALCULATE function to use an inactive relationship in the data model (I need it for a slicer).

I am using this formula "=CALCULATE([Count of Fiscal Week Identified],USERELATIONSHIP(DAS_Pipe[Fiscal Week Identified],Week[Week]))" to create a calculated field I need to add to a pivot table.

I just need Excel to generate the pivot table on the left in the screenshot using a calculated field inserted in values, and the field 'week' in rows (having an inactive relationship in the data model). When I tried using the formula above, I get the table on the right which is completely different from the table on the left, and I cannot figure out why... I need this to include the pivot table in a slicer. Any help would be very much appreciated. Thank you in advance!

Regards,
 

Attachments

  • Data_model.PNG
    Data_model.PNG
    59.3 KB · Views: 23
  • Pivot tables.PNG
    Pivot tables.PNG
    47.6 KB · Views: 24

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hello again,

After digging into it, I found out the USERELATIONSHIP function is not working... The relationship does exist (see the data model), I set them both to "inactive". Does anyone know why the function is not working?

This is the formula I am using to calculate the measure: = CALCULATE(COUNT(DAS_Pipe[Fiscal Week Identified]),USERELATIONSHIP(DAS_Pipe[Fiscal Week Won],Week[Week]))
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top