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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
mhennes1
Frequent Visitor

How to fill a column with a value in another column using ID values as reference

Hello!

I am having an issue with a dataset of survey outputs where each question of the survey is a different row of data. There is a column titled "Survey Invitation ID" that identifies each unique survey. I would like to create a column that can take the response to one particular question (always the same question, 5 possible response values) and fill the column with those responses as they correlate to each specific survey ID (i.e. if customer fills out Survey ID 1 and indicates that they work at a university, the new column with results would identify each row from Survey ID 1 as being a university customer). I tried using the formula 

Check = CALCULATE(MAX('August Test Results'[Response Value]), FILTER(ALL('August Test Results'), 'August Test Results'[Question: Name] = "Which of the following best describes your organization?" && 'August Test Results'[Survey Invitation ID] = EARLIER([Survey Invitation ID])))
But I am getting some false results. Attached is a screenshot of what the Survey ID column looks like, as well as the results of the new formula. The second Survey ID with 3 associated rows does not have a response value, but the formula is populating results regardless.
2021-09-07 14_53_11-SFDC Survey Working POC - Power BI Desktop.png2021-09-07 14_53_43-SFDC Survey Working POC - Power BI Desktop.png
2 REPLIES 2
v-janeyg-msft
Community Support
Community Support

Hi, @mhennes1 

 

The screenshot you shared shows incomplete information. I can’t see some columns in your code, nor can I see the relationship between Survey Invitation ID and other columns in the table.

But I think you problem is not hard to solve if you can upload some insensitive data samples and expected output.


Best Regards,

Community Support Team _ Janey

lbendlin
Super User
Super User

WARNING!!! Salesforce is case sensitive, DAX is not!!!  You must use Case Safe IDs!!!

 

(yes, I know, lots of exclamation marks.  But this is important.)

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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