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

Repetitive Indexing for certain IDs

Hey,

 

Is there a way in Power BI to index a group of repetivie IDs?

 

For example, below is an illustarive dataset with Date, City, and State. I want to be able to index every time Florida (FL) appears, but if the earlier City was also in FL, then I don't want the index to change. I included a column with the desired outcome.

 

The reason I am asking this is because I want to be able to know if the location is currently in FL, and if it is in FL, how long it's been there. With the use of index, I can easily find the answer. If you think of a different solution, I would be more than happy to hear of an alternative answer rather than first indexing.

 

DateCitySateDesired Outcome
5/22/2019 7:06MiamiFL1
5/22/2019 5:23OlrandoFL1
3/29/2019 2:28JacksonvilleFL1
2/23/2019 9:05AtlantaGA 
2/23/2019 9:05Los AngelesCA 
2/20/2019 2:56MiamiFL2
11/20/2018 9:54St. LouisMO 
11/19/2018 6:10Los AngelesCA 
8/21/2018 4:13OrlandoFL3
5/29/2018 5:02New YorkNY 

 

Thank you!

1 ACCEPTED SOLUTION

@eliele There are several ways in which you can accomplish this. Check out this thread - > https://community.powerbi.com/t5/Desktop/Add-Index-Column-which-is-repeated-based-on-Group-by-Text-f...


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

1 REPLY 1

@eliele There are several ways in which you can accomplish this. Check out this thread - > https://community.powerbi.com/t5/Desktop/Add-Index-Column-which-is-repeated-based-on-Group-by-Text-f...


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

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.

Top Solution Authors
Top Kudoed Authors