The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
I want to data 2 column stay in the same row.
follow in this picture in example.:
Thank you for your help.
Solved! Go to Solution.
If all the columns but the 2 you want to get into the same row have the same values, you might be able to use SUMMARIZECOLUMNS()
Returns a summary table over a set of groups.
SUMMARIZECOLUMNS( <groupBy_columnName> [, < groupBy_columnName >]…, [<filterTable>]…[, <name>, <expression>]…)
groupBy_columnName | A fully qualified column reference (Table[Column]) to a base table for which the distinct values are included in the returned table. Each groupBy_columnName column is cross-joined (different tables) or auto-existed (same table) with the subsequent specified columns. |
filterTable | A table expression which is added to the filter context of all columns specified as groupBy_columnName arguments. The values present in the filter table are used to filter before cross-join/auto-exist is performed. |
name | A string representing the column name to use for the subsequent expression specified. |
expression | Any DAX expression that returns a single value (not a table). |
A table which includes combinations of values from the supplied columns, based on the grouping specified. Only rows for which at least one of the supplied expressions return a non-blank value are included in the table returned. If all expressions evaluate to BLANK/NULL for a row, that row is not included in the table returned.
SUMMARIZECOLUMNS does not guarantee any sort order for the results.
A column cannot be specified more than once in the groupBy_columnName parameter. For example, the following formulas are invalid.
SUMMARIZECOLUMNS( Sales[StoreId], Sales[StoreId] )
Filter context
Consider the following query:
SUMMARIZECOLUMNS ( 'Sales Territory'[Category], FILTER('Customer', 'Customer' [First Name] = “Alicia”) )
In this query, without a measure the groupBy columns do not contain any columns from the Filter expression (i.e. from Customer table). The filter is not applied to the groupBy columns. The Sales Territory and the Customer table may be indirectly related through the Reseller sales fact table. Since they're not directly related, the filter expression is a no-op and the groupBy columns are not impacted.
However, with this query:
SUMMARIZECOLUMNS ( 'Sales Territory'[Category], 'Customer' [Education], FILTER('Customer', 'Customer'[First Name] = “Alicia”) )
The groupBy columns contain a column which is impacted by the filter and that filter is applied to the groupBy results.
Help when you know. Ask when you don't!
If all the columns but the 2 you want to get into the same row have the same values, you might be able to use SUMMARIZECOLUMNS()
Returns a summary table over a set of groups.
SUMMARIZECOLUMNS( <groupBy_columnName> [, < groupBy_columnName >]…, [<filterTable>]…[, <name>, <expression>]…)
groupBy_columnName | A fully qualified column reference (Table[Column]) to a base table for which the distinct values are included in the returned table. Each groupBy_columnName column is cross-joined (different tables) or auto-existed (same table) with the subsequent specified columns. |
filterTable | A table expression which is added to the filter context of all columns specified as groupBy_columnName arguments. The values present in the filter table are used to filter before cross-join/auto-exist is performed. |
name | A string representing the column name to use for the subsequent expression specified. |
expression | Any DAX expression that returns a single value (not a table). |
A table which includes combinations of values from the supplied columns, based on the grouping specified. Only rows for which at least one of the supplied expressions return a non-blank value are included in the table returned. If all expressions evaluate to BLANK/NULL for a row, that row is not included in the table returned.
SUMMARIZECOLUMNS does not guarantee any sort order for the results.
A column cannot be specified more than once in the groupBy_columnName parameter. For example, the following formulas are invalid.
SUMMARIZECOLUMNS( Sales[StoreId], Sales[StoreId] )
Filter context
Consider the following query:
SUMMARIZECOLUMNS ( 'Sales Territory'[Category], FILTER('Customer', 'Customer' [First Name] = “Alicia”) )
In this query, without a measure the groupBy columns do not contain any columns from the Filter expression (i.e. from Customer table). The filter is not applied to the groupBy columns. The Sales Territory and the Customer table may be indirectly related through the Reseller sales fact table. Since they're not directly related, the filter expression is a no-op and the groupBy columns are not impacted.
However, with this query:
SUMMARIZECOLUMNS ( 'Sales Territory'[Category], 'Customer' [Education], FILTER('Customer', 'Customer'[First Name] = “Alicia”) )
The groupBy columns contain a column which is impacted by the filter and that filter is applied to the groupBy results.
Help when you know. Ask when you don't!
User | Count |
---|---|
159 | |
110 | |
96 | |
86 | |
75 |
User | Count |
---|---|
157 | |
137 | |
132 | |
81 | |
61 |