Forum Discussion

zivhimmel's avatar
zivhimmel
Icon for Resolver I rankResolver I
8 years ago
Solved

Different calculation in total line

Hi,

I think this is impossible but thought I would try asking.

I'm showing a table of transactions, with a total line.

I'd like, for one of the fields, that the total line will show sum(field)/2.

So summarize all values, then divide by two.

This is a simplified version of what I need but thought I'd start with it.

Any chance this can be done?

Thanks.

 

  • zivhimmel,

     

    You may try the following DAX that adds a measure.

    Measure =
    VAR v =
        SUM ( Table1[value] )
    RETURN
        IF ( HASONEVALUE ( Table1[name] ), v, v / 2 )
    

1 Reply

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

    zivhimmel,

     

    You may try the following DAX that adds a measure.

    Measure =
    VAR v =
        SUM ( Table1[value] )
    RETURN
        IF ( HASONEVALUE ( Table1[name] ), v, v / 2 )