Cumulative Count of Rows in Power BI Table

Hi.
I want to do a row count in a Power BI report(not a total count of row) as seen in this image below. Is there a way to do this? Users want to see the row count against the report rather than a total count of rows.
I anticipate your reply
Thank you.
Cumulative Count of Rows in Power BI Table.pbix (277.8 KB)

@upwardD,

EDNA No PBIX Uploaded Motto GIF

Please provide a PBIX to ensure you get a timely response. One thought for you. You could just add a Index column in Power Query to replace Row Count as shown.

Thanks
Jarrett

2 Likes

Thank you @JarrettM. File now attached
Cumulative Count of Rows in Power BI Table.pbix (277.8 KB)

1 Like

@upwardD,

What exactly do you want to accomplish? Does the Index column I suggested earlier work? Please explain more on what you want the end result to look like.

Thanks
Jarrett

1 Like

Hi @JarrettM,
It seems like indexing persists on the table, otherwise that would have been the best

Hi @upwardD.

A similar question was asked (and solution tendered) on the Power BI Community Forum a few years ago.

Here’s a version of their measure, altered slightly for your sample data and to suppress the total:

Visual Row Number =
IF(
    HASONEVALUE( Orders[Order Date] ),
    CALCULATE(
        COUNTROWS( Orders ),
        FILTER(
            ALLSELECTED( Orders ),
            Orders[Order Date] <= MAX( Orders[Order Date] )
        )
    ),
    BLANK()
)


Please note that this is a quick-and-dirty solution; it works on order date and falls down when there are multiple orders on the same date. Regardless, this should give you a start on a solution.

Hope it helps.
Greg
eDNA Forum - Row Number in Visual.pbix (274.0 KB)

4 Likes

Thank you @Greg. Appreciated