Forum Discussion
Marcel1989
2 years agoFrequent Visitor
Get value from specific column and row number
Hello, let's have a table "table1" like Title Text Site Title 1 Text 1 Site A Title 2 Text 2 Site A Title 3 Text 3 Site A Title 4 Text 4 Site B Title 5 Text 5 Si...
- 2 years ago
Hi,
Please check the below picture and the attached pbix file.
ROWNUMBER function (DAX) - DAX | Microsoft Learn
Expected result measure: = VAR _rownumber = 1 VAR _t = FILTER ( ADDCOLUMNS ( 'Data', "@rownumber", ROWNUMBER ( SUMMARIZE ( 'Data', 'Data'[Title], 'Data'[Text], 'Data'[Site] ), ORDERBY ( 'Data'[Title], ASC, 'Data'[Text], ASC ), DEFAULT, PARTITIONBY ( 'Data'[Site] ) ) ), [@rownumber] = _rownumber ) RETURN CONCATENATEX ( _t, Data[Title], ", " )
Jihwan_Kim
Super User
2 years agoHi,
Please check the below picture and the attached pbix file.
ROWNUMBER function (DAX) - DAX | Microsoft Learn
Expected result measure: =
VAR _rownumber = 1
VAR _t =
FILTER (
ADDCOLUMNS (
'Data',
"@rownumber",
ROWNUMBER (
SUMMARIZE ( 'Data', 'Data'[Title], 'Data'[Text], 'Data'[Site] ),
ORDERBY ( 'Data'[Title], ASC, 'Data'[Text], ASC ),
DEFAULT,
PARTITIONBY ( 'Data'[Site] )
)
),
[@rownumber] = _rownumber
)
RETURN
CONCATENATEX ( _t, Data[Title], ", " )
Marcel1989
2 years agoFrequent Visitor
Hi Jihwan_Kim,
thank you so much, it works. 🙂
I needed a few minutes to understand the solution and learned something new. Thanks!