Forum Discussion

Wiene24's avatar
Wiene24
Icon for Helper II rankHelper II
7 years ago
Solved

Sum with two standards

Hi,

 

I have the following problem:

 

FileTournumberPriceLo/La
1149071500LA
1149071500LO
2149071230LA
2149071230LO
3149072600LA
3149072600LO
1149072480LA
1149072480LO
4149073250LA
4149073250LO

 

Now I want to add a new Colomn that shows me on each row how much the total price was of the tournumber where LA/LO = "LO". I have to do it with a colomn because the report is based on orders and a order can be on multiple tours.

 

The filenumbers and tournumbers are alot of different numbers.

 

I want to create this:

 

FileTournumberTotal price of tour
1149071730
2149071730
31490721100
11490721100
4149073250

 

This I have to use to create a measurement dived the costs based on the file prices.

 

I hope it makes a bit sense, sometimes it's hard to explain what you exactly mean!

 

Kind regards,

 

Tim Wijnen

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi Wiene24 ,

    You can use following calculated column formula to summarize same tour price with 'lo' status:

    Total Price =
    CALCULATE (
        SUM ( Table[Price] ),
        FILTER (
            ALLSELECTED ( Table ),
            [LO/LA] = "LO"
                && [Tournumber] = EARLIER ( Table[Tournumber] )
        )
    )
    

    Regards,

    Xiaoxin Sheng

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Wiene24 ,

    You can use following calculated column formula to summarize same tour price with 'lo' status:

    Total Price =
    CALCULATE (
        SUM ( Table[Price] ),
        FILTER (
            ALLSELECTED ( Table ),
            [LO/LA] = "LO"
                && [Tournumber] = EARLIER ( Table[Tournumber] )
        )
    )
    

    Regards,

    Xiaoxin Sheng