Forum Discussion

LeonardCs's avatar
LeonardCs
Icon for Helper I rankHelper I
2 years ago
Solved

HELP WITH DAX

Hi guys,

 

I have a table with colummn that contains several numbers and I need to sum them.
It would be easy, but in this colummn I have some words together and I can't take this words.

 

for exemple:

 

Values:
10,00

20,00

not yet

30,00

loading

40,00....

 

 

How can I creat a measure that just sum the numbers disregarding the words?

6 Replies

  • tamerj1's avatar
    tamerj1
    Icon for Community Champion rankCommunity Champion

    Hi LeonardCs 
    Please try

    Measure = 
    SUMX ( 
        'Table',
        IFERROR ( 'Table'[Value] + 0, 0 )
    )
      • tamerj1's avatar
        tamerj1
        Icon for Community Champion rankCommunity Champion

        Lol
        It's been a while since I last answered a question in the forum.

    • LeonardCs's avatar
      LeonardCs
      Icon for Helper I rankHelper I

      This was easier than I imagined! Thank you so much 🙏🙏

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    LeonardCs Try this. PBIX attached below signature.

    Measure = 
        VAR __Table = 
            ADDCOLUMNS(
                'Table',
                "Column1", IF( ISERROR( [Values:] + 0 ), BLANK(), [Values:] + 0 )
            )
        VAR __Result = SUMX( __Table, [Column1] )
    RETURN
        __Result