Forum Discussion

7 Replies

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

    Hi admin11 

    change the formula If by Switch

     

    Before that you need to add

     

     

     

     

  • v-robertq-msft's avatar
    v-robertq-msft
    Icon for Community Support rankCommunity Support

    Hi, admin11 

    According to your sample picture, you want the column [Switch_YTD REV&COGS1] can also show the total in the total row, right? You can create a new measure:

    Switch_YTD REV&COGS1 =
    
    var _new=
    
    SUMMARIZE('Table','Table'[REV&COGS],"_value",[Switch_YTD REV&COGS])
    
    return
    
    IF(HASONEVALUE('Table'[REV&COGS]),[Switch_YTD REV&COGS],SUMX(_new,[_value]))

    Then place the measure into the original table chart to replace the original [Switch_YTD REV&COGS1], you can get what you want, like this:

     

    You can download my test pbix file here

     

    Best Regards,

    Community Support Team _Robert Qin

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