Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jtownsend21
Responsive Resident
Responsive Resident

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)?

 

Rev per Appeal.PNG

 

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

1 ACCEPTED SOLUTION

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)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

So, are those two calculations measures? If so, you should just be able to divide them. Sample data helps tremendously. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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

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)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

That worked perfectly! I was trying to connect the date on the two tables, but hadn't thought about creating an independent calendar table. Thank you for your help on this! 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.