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
olsen9
Frequent Visitor

Need help creating a new Counter in Table

Whenever the report is refreshed and updated, was looking to see a new column added called ID that starts with 1 then each row is 2, 3, 4, 5 etc

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi  @olsen9 ,

You can try the following measure to show the dynamic index.

RowNum = 
CALCULATE (
    COUNT ( 'Table'[ID] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        'Table'[ID]  <= MAX ( 'Table'[ID]  )
    )
)

 vpollymsft_0-1673839675326.gif

I have also found a similar post, please refer to it to see if it helps you.

Solved: How can I create a simple index column with dax. - Microsoft Power BI Community

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

3 REPLIES 3
v-rongtiep-msft
Community Support
Community Support

Hi  @olsen9 ,

You can try the following measure to show the dynamic index.

RowNum = 
CALCULATE (
    COUNT ( 'Table'[ID] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        'Table'[ID]  <= MAX ( 'Table'[ID]  )
    )
)

 vpollymsft_0-1673839675326.gif

I have also found a similar post, please refer to it to see if it helps you.

Solved: How can I create a simple index column with dax. - Microsoft Power BI Community

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

 

selimovd
Super User
Super User

Hey @olsen9 ,

 

you can call a stored procedure during the import that is incrementing the value or adding one in a table.

This table you can then return as a result of the stored procedure.

 

To make your life easier, I personally would just return the last refresh date/time. But the approach I just mentioned should give you the result you want.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

Best regards
Denis

Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic

Thanks, I probably should have said I'm using data in SP online.  No access to SQL

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.