Forum Discussion
Cannot put a changing status on a table row
- 9 years ago
Hi IanR,
Is there a way to stop ALL from bringing back only unique records, or is there another table function that can bring back selected columns without applying a DISTINCT?
Actually, when combine two tables (some selected columns) into a single one, it will return all data rows rather than return distinct values. So, in your scenario, not sure how you created the calculated table via UNION function, please provide sample data of source tables. According to current description, it's hard to imagine your table structure and not very clear about your requirement. It would be better you could elaborate your scenario with some examples.
Is there a way, in a function like ALL, to add a literal value to a column? Something like:
SELECT Column_A, ‘iteral value’ AS Column_B FROM Opportunities
Does this meet your requirement?
Table = UNION ( SELECTCOLUMNS ( Table1, "Col1", Table1[Table1_col1], "Col2", Table1[Table_col2] ), SELECTCOLUMNS ( Table2, "Col1",Table2[Table2_col1], "Col2", "iteral value" ) )Best regards,
Yuliana Gu
Hi IanR,
Is there a way to stop ALL from bringing back only unique records, or is there another table function that can bring back selected columns without applying a DISTINCT?
Actually, when combine two tables (some selected columns) into a single one, it will return all data rows rather than return distinct values. So, in your scenario, not sure how you created the calculated table via UNION function, please provide sample data of source tables. According to current description, it's hard to imagine your table structure and not very clear about your requirement. It would be better you could elaborate your scenario with some examples.
Is there a way, in a function like ALL, to add a literal value to a column? Something like:
SELECT Column_A, ‘iteral value’ AS Column_B FROM Opportunities
Does this meet your requirement?
Table =
UNION (
SELECTCOLUMNS (
Table1,
"Col1", Table1[Table1_col1],
"Col2", Table1[Table_col2]
),
SELECTCOLUMNS ( Table2, "Col1",Table2[Table2_col1], "Col2", "iteral value" )
)
Best regards,
Yuliana Gu
UNION and SELECTCOLUMNS.
Perfect.