Forum Discussion

jtownsend21's avatar
jtownsend21
Responsive Resident
8 years ago
Solved

Calculation between two unrelated data sources

Hi all, I have two data sources that I cannot relate, but would like to be able to do something like the following. Is this possible using DAX (or any other functionality)?

 

 

Revenue is calculated as a sum while appeals are calculated by a distinct count. Other than filtering to a given date range (month/qtr/year) there are no other filters. 

 

Thoughts? 

 

SEE SAMPLE DATA HERE

  • Looking at this I'm not sure that I fully understand what you are trying to accomplish but what I would recommend would be to first create a New Table with the following formula:

     

    Calendar = CALENDARAUTO()

    This should create a calendar table that you can then relate to both of your other tables. Then you can create a slicer based upon this new Calendar table.

     

    Then, you would have the following measures:

     

    Revenue = SUM('Revenue'[NetRevenue])
    
    Appeals = DISTINCTCOUNT('Appeals'[Appeal Id])
    
    RevenuePerAppeal = DIVIDE([Revenue],[Appeals],0)

4 Replies

    • jtownsend21's avatar
      jtownsend21
      Responsive Resident

      They are calculations from two different tables which have no relationship and therefore I don't know of a way to simply divide them. 

       

      Just updated the original post with a link to some sample data. Sorry I didnt include it on the first go around. Cheers

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Looking at this I'm not sure that I fully understand what you are trying to accomplish but what I would recommend would be to first create a New Table with the following formula:

         

        Calendar = CALENDARAUTO()

        This should create a calendar table that you can then relate to both of your other tables. Then you can create a slicer based upon this new Calendar table.

         

        Then, you would have the following measures:

         

        Revenue = SUM('Revenue'[NetRevenue])
        
        Appeals = DISTINCTCOUNT('Appeals'[Appeal Id])
        
        RevenuePerAppeal = DIVIDE([Revenue],[Appeals],0)