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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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