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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
JennyMilf
Helper I
Helper I

Index column in Table visual

Hello everyone,
I have 2 table: Project, and Member
How can I create or add index column in my table visual Moji Monitoring based on the condition in slicer? I tried Add Column --> Index Column (from 1) but it's doesn't work. Can anyone please help me to implement it? Thanks

 

Refer to my Dashboard 

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

Hi   

Please try this:
Here I create a new measure:

MEASURE =
VAR _vtable =
    CALCULATETABLE (
        SUMMARIZECOLUMNS (
            'Member'[Member Name],
            'Member'[Project ],
            'Project'[Code],
            "_Phase Combination", 'Project'[Phase Combination],
            "_SumIndex", SUM ( Project[Index] )
        ),
        ALLSELECTED ( Project ),
        ALLSELECTED ( 'Member' )
    )
VAR _vtable2 =
    ADDCOLUMNS ( _vtable, "ABC", RANKX ( _vtable, [_SumIndex],, ASC ) )
RETURN
    SUMX ( FILTER ( _vtable2, [_SumIndex] = SUM ( Project[Index] ) ), [ABC] )

It's noting that the result is obtained through the Index column

The result is as follow:

vzhengdxumsft_2-1739773632391.pngvzhengdxumsft_3-1739773640964.png

 

 

 

Best Regards

Zhengdong Xu
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

4 REPLIES 4
v-zhengdxu-msft
Community Support
Community Support

Hi   

Please try this:
Here I create a new measure:

MEASURE =
VAR _vtable =
    CALCULATETABLE (
        SUMMARIZECOLUMNS (
            'Member'[Member Name],
            'Member'[Project ],
            'Project'[Code],
            "_Phase Combination", 'Project'[Phase Combination],
            "_SumIndex", SUM ( Project[Index] )
        ),
        ALLSELECTED ( Project ),
        ALLSELECTED ( 'Member' )
    )
VAR _vtable2 =
    ADDCOLUMNS ( _vtable, "ABC", RANKX ( _vtable, [_SumIndex],, ASC ) )
RETURN
    SUMX ( FILTER ( _vtable2, [_SumIndex] = SUM ( Project[Index] ) ), [ABC] )

It's noting that the result is obtained through the Index column

The result is as follow:

vzhengdxumsft_2-1739773632391.pngvzhengdxumsft_3-1739773640964.png

 

 

 

Best Regards

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

 

Fowmy
Super User
Super User

@JennyMilf 

While creating a table or calculated column in Power BI, capturing slicer selections in real-time isn't feasible. Power BI constructs tables and columns before making them available on the report canvas. 
A measure can be created using Rank function. Let me know if this is helpful or provide the logic of the index you need to create.


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Akash_Varuna
Solution Sage
Solution Sage

Hi @JennyMilf You could try with DAX by creating a column or measure then adding it
example dax measure : DynamicIndex = RANKX(ALLSELECTED('Project'), 'Project'[SomeValue], , ASC, Dense)

Thanks, but this DAX is not work

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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