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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
KubenM
Advocate II
Advocate II

Modify DAX to return the value in the Cell

Good Day

Is it possible to modify the following DAX (was generously created by tamerj1) to return the actual value of the Cell instead of returning a Count? The BE Status as referred to in the DAX below holds values such as "To Do", "Analysis", "In Progress", etc.

The reason for my request is that I would like the actual value "Analysis" to be displayed under my Matrix column instead of the count.

BE Status =
CALCULATE (
    SUM( ('Table'[BE Status]) ),
    FILTER (
        'Table',
        VAR SelectedValues =
            VALUES ( FilterTable[Item Value] )
        VAR String = 'Table'[Fixed Version]
        VAR Items =
            SUBSTITUTE ( String, ", ", "|" )
        VAR Length =
            COALESCE ( PATHLENGTH ( Items ), 1 )
        VAR T1 =
            GENERATESERIES ( 1, Length, 1 )
        VAR T2 =
            SELECTCOLUMNS ( T1, "@Item", PATHITEM ( Items, [Value] ) )
        RETURN
            NOT ISEMPTY ( INTERSECT ( T2, SelectedValues ) ) && 'Table'[BE Status]
    )
) + 0
1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hello friend.

@KubenM Please try

BE Status =
CONCATENATEX (
    FILTER (
        'Table',
        VAR SelectedValues =
            VALUES ( FilterTable[Item Value] )
        VAR String = 'Table'[Fixed Version]
        VAR Items =
            SUBSTITUTE ( String, ", ", "|" )
        VAR Length =
            COALESCE ( PATHLENGTH ( Items ), 1 )
        VAR T1 =
            GENERATESERIES ( 1, Length, 1 )
        VAR T2 =
            SELECTCOLUMNS ( T1, "@Item", PATHITEM ( Items, [Value] ) )
        RETURN
            NOT ISEMPTY ( INTERSECT ( T2, SelectedValues ) )
    ),
    'Table'[BE Status],
    UNICHAR ( 10 )
)

 

 

View solution in original post

2 REPLIES 2
KubenM
Advocate II
Advocate II

Hello my Friend @tamerj1  Solution works perfectly. Once again thank you for your knowledge share.

KubenM_0-1680526208555.png

 

tamerj1
Super User
Super User

Hello friend.

@KubenM Please try

BE Status =
CONCATENATEX (
    FILTER (
        'Table',
        VAR SelectedValues =
            VALUES ( FilterTable[Item Value] )
        VAR String = 'Table'[Fixed Version]
        VAR Items =
            SUBSTITUTE ( String, ", ", "|" )
        VAR Length =
            COALESCE ( PATHLENGTH ( Items ), 1 )
        VAR T1 =
            GENERATESERIES ( 1, Length, 1 )
        VAR T2 =
            SELECTCOLUMNS ( T1, "@Item", PATHITEM ( Items, [Value] ) )
        RETURN
            NOT ISEMPTY ( INTERSECT ( T2, SelectedValues ) )
    ),
    'Table'[BE Status],
    UNICHAR ( 10 )
)

 

 

Helpful resources

Announcements
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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