Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Yi
Regular Visitor

How to measure rows(in visual) of a table don't count part duplicated rows

I searched there are several message asked how to show rows of a talble in visial. But my challenge is there are some duplicated rows not displayed in table. For example , there is  a table including Index, City, Street, Value1 and Value2 information. There are duplicated value in City and Street, but Value1 and Value2 are different. Like

Index   City    Street  Value1  Value2

1           A       123      D1        C1

2           A       123      D2        C2

3           A       456      D3        C3

4           A       456      D4       C4

5           B       131      D5        C5

I use a scatter to see the Value distribution and I also want to use a table to see how many City and Street couples when I change a filter by Value1

I have the problem to show the row number in table, it show like

RowNo  City   Street

2            A       123

4            A        456

5            B        131 

What I want is

RowNo  City  Street

1            A       123

2            A       456

3            B        131

Much appreciated any feedback and help. Thanks in advance

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @Yi,

 

I would suggest you use a measure since the RowNo doesn't exist in the data table.

RowNo =
RANKX (
    ALL ( Table1[City], Table1[Street] ),
    CALCULATE ( MAX ( 'Table1'[Index] ) ),
    ,
    ASC
)

How_to_measure_rows_in_visual_of_a_table_don_t_count_part_duplicated_rows

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @Yi,

 

I would suggest you use a measure since the RowNo doesn't exist in the data table.

RowNo =
RANKX (
    ALL ( Table1[City], Table1[Street] ),
    CALCULATE ( MAX ( 'Table1'[Index] ) ),
    ,
    ASC
)

How_to_measure_rows_in_visual_of_a_table_don_t_count_part_duplicated_rows

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

After changed from ASC to DESC, it worked as I want. Many thanks Dale!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.