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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Calculated Column filter dynamic

Hi
I have created a new column with dax this way :

MCS =
VAR CurrentKey = 'Release planner'[FC ID]
VAR MultifactorFiltered = FILTER('Multifactor PI Calculator', 'Multifactor PI Calculator'[Multifactor PI] = "2023PI3")
VAR MatchingKey = COUNTROWS(FILTER(MultifactorFiltered, 'Multifactor PI Calculator'[FC number] = CurrentKey))

VAR DividerToUse =
IF(
MatchingKey > 0,
MAXX(MultifactorFiltered, [Value]),
'Release planner'[FC size]
)

RETURN
IF(
DividerToUse < 1,
'Release planner'[MCS Effort] * DividerToUse,
'Release planner'[MCS Effort] / DividerToUse
)


There reason behind this is that sometimes the column need to be calculated from a different table. I am using this column on different tabs as well and it needs to be able to change by everytab. In the line 3 "2023PI3" part needs to be dynamic in someways, slicer filter not sure.
I have tried to create a new table with just these values and use it as a slicer but it would change the end value.
Thanks inadvance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

If you wish to replace "2023PI3" with the value selected by the slicer, you need to
1. Create a measure instead of a calculated column, because calculated columns cannot change dynamically.
2. Create a slicer table.

3.Change "2023PI3" in the metric to SELECTEDVALUE('Slicer Table'[Value]), which will change depending on the value of the slicer.

vtangjiemsft_0-1692685304430.png

Best Regards,

Neeko Tang

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
Anonymous
Not applicable

Hi @Anonymous ,

 

If you wish to replace "2023PI3" with the value selected by the slicer, you need to
1. Create a measure instead of a calculated column, because calculated columns cannot change dynamically.
2. Create a slicer table.

3.Change "2023PI3" in the metric to SELECTEDVALUE('Slicer Table'[Value]), which will change depending on the value of the slicer.

vtangjiemsft_0-1692685304430.png

Best Regards,

Neeko Tang

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

 

Anonymous
Not applicable

Thanks for the help, it worked , do you mind helping me with this part as well? I want to create a running total of this measure, for which I have an index column for the order. This was the older version:

MCS RT = 
VAR currentIndex = MAX('Release planner'[Index])
RETURN
    CALCULATE(
        SUM('Release planner'[MCS]),
        FILTER(
            ALLSELECTED('Release planner'),
            'Release planner'[Index] <= currentIndex
        )
    )


Many thanks already

Anonymous
Not applicable

Hi @Anonymous ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1692693489706.png

(2) We can create a measure. 

total = SUMX(ALL('Release planner'[Index]),[MCS RT])

(3) Then the result is as follows.

vtangjiemsft_1-1692693536138.png

vtangjiemsft_2-1692693548094.png

 

Best Regards,

Neeko Tang

Anonymous
Not applicable

Yes this is what I want to achive, but as in the first space we created a measure for MCS so we can't use the SUM function in line 5 fro MCS RT.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.