Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Total Revenue.

Hello everyone in the bi community! I'm totally new to this platform. My concern is that I need to find total revenue by month; I already have the quantity and the price of the unit. but unit column includes ( -) values Also, can anyone please explain to me how to calculate an accurate value?

  • Anonymous 

     

    if by  ( - )  you mean negative values, then what do you want to do with them ? you want to exclude them ? 

    measure= 

    var ds = 

    filter(

    tbl_name[col_name],

    tbl_name[col_name]>0
    )

     

    return 

    sumx ( 

     ds , 

    tbl_name[col_name]

    )

     

     

     

    if by ( - ) you mean dash , then in power query, replace  -    with null using replace values which can be found under transform

     

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up πŸ‘ and mark it as the solution βœ…
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🀠

     

2 Replies

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    Anonymous 

     

    if by  ( - )  you mean negative values, then what do you want to do with them ? you want to exclude them ? 

    measure= 

    var ds = 

    filter(

    tbl_name[col_name],

    tbl_name[col_name]>0
    )

     

    return 

    sumx ( 

     ds , 

    tbl_name[col_name]

    )

     

     

     

    if by ( - ) you mean dash , then in power query, replace  -    with null using replace values which can be found under transform

     

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up πŸ‘ and mark it as the solution βœ…
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🀠

     

  • PijushRoy's avatar
    PijushRoy
    Community Champion

    Hi Anonymous 

    What is the meaning of (-)unit,
    What is the Total revenue calculation you are looking for
    Please add more details