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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Beth_H
Frequent Visitor

Calculated Column that might pull multiple values

Hi there,

 

I am trying to create a table which pools information from another table but orders in a different way.

 

Below is the UserFieldValue table. 

 

UserFieldValue   
RecordIDUserFieldIDUserFieldNameValue
1855AgencyBlue
1700DepartmentBlack
2700DepartmentYellow
2855AgencyBlue
3677BlockGreen
3855AgencyGrey
3855AgencyYellow
4677BlockGreen
4955CustomRed
5855AgencyBlue
5700DepartmentBlue
5650BenchBlack

 

Using this data, I want to create a table that has primary key 'RecordID' and shows each UserFieldName as a column where the cells are the Values, and recordIDs with multiple inputs for a UserField show "Multiple Input":

 

RecordIDAgencyDepartmentBlockBenchCustom
1BlueBlack   
2BlueYellow   
3Multiple Input Green  
4  Green Red
5BlueBlue Black 

 

I have tried creating a table of unique IDs and then adding calculated columns using the below but this seems to just show Multiple Input for every single RecordID

Agency = CALCULATE(
    SELECTEDVALUE(UserFieldValue[All_UserFieldValue], "Multiple Input"),
    FILTER(UserFieldValue, UserFieldValue[UserFieldId]=855)
)
 
 
Does anyone have any ideas as to where I'm going wrong?
2 REPLIES 2
HotChilli
Super User
Super User

selectedvalue is going to return the "Multiple Input" if the UserFieldValue[All_UserFieldValue] is blank OR there are multiple values so this may require more work.

However, the main problem is that the RecordID is not passed to the FILTER statement so it will be looking for userfieldid = 855 without the specific ID.  So you can probably  just add that in to the search clauses (&& UserFieldValue[RecordID] = thisTable[RecordID] )

 

--

Also the column seems to have 2 different names (value or All_userFieldValue)

The different value names are because I was simplifying the data for the sake of this post and missed an alteration..

But you're quite right! The FILTER did need specification on the recordid, have since adjusted:

 

 

Agency = CALCULATE(
    SELECTEDVALUE(UserFieldValue[Value]),
    FILTER(UserFieldValue, UserFieldValue[RecordId]='Custom Field Reporting'[Id] && UserFieldValue[UserFieldId]=855)
)
 
However still faced with the issue that when an ID has multiple input values, the SELECTEDVALUE returns a blank

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.