Forum Discussion
ANILKORLIMARLA
3 years agoFrequent Visitor
apply row number in table visual
i want to add row number to this table , The row number need to change as per the filter selection. i donot have any measure in this table
- 3 years ago
Hi,
Thank you for your feedback.
I fixed the measure like below.
Please check the attached file as well.
Thank you.
Row number measure: = VAR _newtable = ADDCOLUMNS ( ALLSELECTED( Data ), "@Rankcategory", CALCULATE ( RANKX ( ALLSELECTED( Data ), CALCULATE ( MAX ( Data[Category] ) ),, asc, DENSE ) ), "@Ranksubcategory", CALCULATE ( RANKX ( ALLSELECTED( Data ), CALCULATE ( MAX ( Data[Sub-Category] ) ),, asc, DENSE ) ) ) VAR _newranking = ADDCOLUMNS ( _newtable, "@newranking", RANKX ( _newtable, [@Rankcategory] * 100 + [@Ranksubcategory],, asc ) ) RETURN MAXX ( FILTER ( _newranking, Data[Category] = MAX ( Data[Category] ) && Data[Sub-Category] = MAX ( Data[Sub-Category] ) ), [@newranking] )
Jihwan_Kim
Super User
3 years agoHi,
Please check the below picture and the attached pbix file.
Row number measure: =
VAR _newtable =
ADDCOLUMNS (
ALL ( Data ),
"@Rankcategory",
CALCULATE (
RANKX ( ALL ( Data ), CALCULATE ( MAX ( Data[Category] ) ),, asc, DENSE )
),
"@Ranksubcategory",
CALCULATE (
RANKX ( ALL ( Data ), CALCULATE ( MAX ( Data[Sub-Category] ) ),, asc, DENSE )
)
)
VAR _newranking =
ADDCOLUMNS (
_newtable,
"@newranking",
RANKX ( _newtable, [@Rankcategory] * 100 + [@Ranksubcategory],, asc )
)
RETURN
MAXX (
FILTER (
_newranking,
Data[Category] = MAX ( Data[Category] )
&& Data[Sub-Category] = MAX ( Data[Sub-Category] )
),
[@newranking]
)
ANILKORLIMARLA
3 years agoFrequent Visitor
thanks Kim for the quick response, when i apply category filter and select technology the row number is not updating dynamically.
- Jihwan_Kim3 years ago
Super User
Hi,
Thank you for your feedback.
I fixed the measure like below.
Please check the attached file as well.
Thank you.
Row number measure: = VAR _newtable = ADDCOLUMNS ( ALLSELECTED( Data ), "@Rankcategory", CALCULATE ( RANKX ( ALLSELECTED( Data ), CALCULATE ( MAX ( Data[Category] ) ),, asc, DENSE ) ), "@Ranksubcategory", CALCULATE ( RANKX ( ALLSELECTED( Data ), CALCULATE ( MAX ( Data[Sub-Category] ) ),, asc, DENSE ) ) ) VAR _newranking = ADDCOLUMNS ( _newtable, "@newranking", RANKX ( _newtable, [@Rankcategory] * 100 + [@Ranksubcategory],, asc ) ) RETURN MAXX ( FILTER ( _newranking, Data[Category] = MAX ( Data[Category] ) && Data[Sub-Category] = MAX ( Data[Sub-Category] ) ), [@newranking] )