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
Whitewater100
Solution Sage
Solution Sage

Measure for Index Starting at One Based on Slicer Selection

Hello PBI Community: 

I am looking for assistance to evelope a measure that would have an index column in a table visual, always start with one, based on a slicer selection. I have provided a sample file and desired results. Thank in advance for any input on this measure. 

Please see attached. Thank you!https://drive.google.com/file/d/1nqTERC3Hdhng7vxtvlhXgmCdJT40rSFU/view?usp=share_link 

1 ACCEPTED SOLUTION

Hi ThxAlot: That worked fantastic on my example. Thank you very much. I'll accept as the solution. 
What is strange is when I apply the measure to my real data it counts the total number of ID's. Maybe I can try reproducing a table similiar to what I have. But you solved what was asked. Thank you!

View solution in original post

2 REPLIES 2
ThxAlot
Super User
Super User

Idx = 
CALCULATE(
    DISTINCTCOUNT( 'Table'[ID] ),
    'Table'[index] <= MAX( 'Table'[Index] ),
    ALLSELECTED()
)

ThxAlot_0-1682801709106.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



Hi ThxAlot: That worked fantastic on my example. Thank you very much. I'll accept as the solution. 
What is strange is when I apply the measure to my real data it counts the total number of ID's. Maybe I can try reproducing a table similiar to what I have. But you solved what was asked. Thank you!

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