Forum Discussion

Manuel123's avatar
Manuel123
Icon for Helper I rankHelper I
4 years ago
Solved

Substract same calculated value irrespective of the date

Dear Helpers,

 

I hope you can help me as I was not able to figure this out...

I have a table with some meta data. E.g. like the following one:

ProjectCountryValueVolume
Number oneEngland10100
Number twoEngland2080

 

Then I have a table with a date column and a price column.

What I would like to have is a measure like: Difference = Price on the date - (Volume weighted Value of Projecttable)

 

However, as I don't have a date column in the Project table I don't know how to get this done.

 

BR
Manuel

 

  • Hi Manuel123 ,

     

    Please try the following measures:

     

    Volume weighted Value = 
    SUMX (
        SUMMARIZE (
            ProjectTable,
            ProjectTable[Project],
            "_sum", SUM ( ProjectTable[Value] ) * SUM ( ProjectTable[Volume] )
        ),
        [_sum]
    )
        / SUM ( ProjectTable[Value] )
    Measure = SUM('Table'[Price]) - [Volume weighted Value]

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

1 Reply

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

    Hi Manuel123 ,

     

    Please try the following measures:

     

    Volume weighted Value = 
    SUMX (
        SUMMARIZE (
            ProjectTable,
            ProjectTable[Project],
            "_sum", SUM ( ProjectTable[Value] ) * SUM ( ProjectTable[Volume] )
        ),
        [_sum]
    )
        / SUM ( ProjectTable[Value] )
    Measure = SUM('Table'[Price]) - [Volume weighted Value]

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.