Forum Discussion
Anonymous
5 years agoNot applicable
Repeat every value for each id
Hi, Is there a way to easily convert a table to list all values for each id? This is the solution I'm looking for: Thank you in advance! Julia
- Anonymous5 years ago
Hi Anonymous ,
Please following these steps:
1. Add a column whose value is 1 and a column which group ID and Type in table:
Value = 1IDType = [ID] & [Type]2. Create a calculated table using the following formula:
Table 2 = VAR _tab = ADDCOLUMNS ( CROSSJOIN ( ALL ( 'Table'[ID] ), ALL ( 'Table'[Type] ) ), "IDType", [ID] & [Type] ) RETURN ADDCOLUMNS ( _tab, "Re", VAR _val = LOOKUPVALUE ( 'Table'[Value], 'Table'[IDType], [IDType] ) RETURN IF ( _val = BLANK (), 0, _val ) )My final output looks like this:
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.Best Regards,
Eyelyn Qin
Anonymous
5 years agoNot applicable
Hi Anonymous ,
I'm a little confused with your requirement...
Best Regards,
Eyelyn Qin