Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Create a 'virtual' matrix table based on 2 tables

I'm trying to combine two tables into a matrix. The use case is that I have sales in different categories and based on previous years I know the relative sales. Something like this:     January...
  • v-henryk-mstf's avatar
    4 years ago

    Hi Anonymous ,


    According to your description, I did the test reference as follows:

    Table =
    VAR Feb =
        CALCULATE ( MAX ( Table2[Rate] ), Table2[Month] = "February" )
    VAR Mar =
        CALCULATE ( MAX ( Table2[Rate] ), Table2[Month] = "March" )
    VAR Apr =
        CALCULATE ( MAX ( Table2[Rate] ), Table2[Month] = "April" )
    RETURN
        SUMMARIZE (
            Table1,
            Table1[Product],
            "Jan", MAX ( Table1[Value] ),
            "Feb",
                ( 1 + Feb )
                    * MAX ( Table1[Value] ),
            "Mar",
                ( 1 + Mar )
                    * MAX ( Table1[Value] ),
            "Apr",
                ( 1 + apr )
                    * MAX ( Table1[Value] )
        )

     


    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


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