Forum Discussion
Creating a table with multiple values filtered from same table
Hi Parita, You have been so instrumental in helping me before, I am glad you replied to me again.
I have attempted to do the Pivot Column again and I keep getting the error - 'Expression.Error: We cannot apply a pivot operation over a table that contains columns with nested data. Please remove those columns first.'
Problem I have is that I do not even see any nested data.
I also attempted the Modeling table solution to create a new table. Tat too does not work since It appears I am not getting the syntax correct to include filtering.
Any suggestions?
Perhaps I am not being descriptive enough. Here is what my data sets look like. Relationships are defined with rootID#
| Table A | ||
| RootId# | Number | |
| -2147479388 | FL-16-10-1632 | |
| Table B | ||
| RootId# | Number | Type |
| -2147479388 | FL-16-10-1632-1 | 1 |
| -2147479388 | 5011312-0488477e | 2 |
| -2147479388 | 5011412-0436634e | 9 |
When I add a new column to filter the number field in Table B by type I can do it using an IF statement.
Example :
OwnerPolicyNumber = IF('pfm TitleProduct'[Type] = 9,'pfm TitleProduct'[Number])
When attempting to do the same type of expression using calculate I get a circular dependancy.
Owner Number = 'B'[RootId#] && CALCULATE(Values(B'[Number]),FILTER('B','B'[Type]=9 ))
I am trying to get an end result like this:
| A.Number | B.OwnerPolicyNumber | B.LoanPolicyNumber |
| FL-16-10-1632 | 5011412-0436634e | 5011312-0488477e |
Not like this:
| A.Number | B.OwnerPolicyNumber | B.LoanPolicyNumber |
| FL-16-10-1632 | ||
| FL-16-10-1632 | 5011412-0436634e | |
| FL-16-10-1632 | 5011312-0488477e |
- dkay84_PowerBI9 years agoMicrosoft Employee
I'm having a hard time following what you describe, but just from looking at your demo data, you are trying to pivot the Number field by RootId# so that for every RootId# you have 3 columns?
- TM_Evan9 years agoHelper I
What I am attempting to do is pivot the number field with the Type so that the 2 of the 3 Number types will display on the single rootId#.
I did manage to add a SQL data source using a SQL query with a degree of success. Only thing with this was that I was only able to Import vs DIrectQuery. So I am definitely getting closer to my solution.
I really appreciate all of the feedback since it is growing my knowledge greatly.