Forum Discussion

nhodges's avatar
nhodges
Helper I
2 years ago
Solved

Combining like measures for different tables

I have 5 tables all with their own seperate Total Revenue Calculation formulas. In each table I have created a Total Revenue Measure. Now I would like one big table that shows all the Total revenue measures in the same column so my goal is to have something that looks like this.

TABLE NAMETOTAL REVENUE
Table 1 Name Total Revenue in table 1
Table 2 Name Total Revenue in table 2
Table 3 NameTotal Revenue in table 3
Table 4 NameTotal Revenue in table 4
  • Hi nhodges ,

     

    Is this what you want? Define the row header first, and then you can define which measure to use in each row.

     

    I have a dummy file for reference, please replace the table and measure to your own. Thanks.

    Exercise File

     

7 Replies

  • isjoycewang's avatar
    isjoycewang
    Solution Supplier

    Hi nhodges ,

     

    Is this what you want? Define the row header first, and then you can define which measure to use in each row.

     

    I have a dummy file for reference, please replace the table and measure to your own. Thanks.

    Exercise File

     

    • nhodges's avatar
      nhodges
      Helper I

      One more question: Is this added as a table formula, or measure? Seems like I am building a new table then putting this as the formula? Is that correct?

       

      This looks great, will give this a try!

      Thank you for the help!

      • nhodges's avatar
        nhodges
        Helper I

        I already have a CALENDAR table that they all connect to

  • srry am unable to open the file because it is restricted at my work.

    • isjoycewang's avatar
      isjoycewang
      Solution Supplier

      Oops, let me explain the steps below:

      1. Create a new table with your table name as row header [Metric]. 

      2. Create measure to define which measure to use in each row [Total Revenue].

      3. Put the [Metric] and [Total Revenue] into your table visual.

       

      Total Revenue = 
      SWITCH(TRUE(),
      SELECTEDVALUE('Table'[Table Name]) = "Table1", [Total Revenue in Table 1],
      SELECTEDVALUE('Table'[Table Name]) = "Table2", [Total Revenue in Table 2],
      SELECTEDVALUE('Table'[Table Name]) = "Table3", [Total Revenue in Table 3], 
      BLANK())

       

       

       

      • nhodges's avatar
        nhodges
        Helper I

        You're awesome thank you!

         

        If I wanted to break it down month over month afterwards so something like this:

        Would I follow similar steps? and just add on to the formula? but I wouldnt want to have to add a month each time, no sure if theres a way for that, but I can keep playing around with it.