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
Zaynah16
Helper I
Helper I

Filters across multiple tables

Hi guys, 

 

Please help

 

I am trying to apply a filter across multiple tables. 

 

I have calculated Return on Investment as below however revenue, cost Savings and cost incurred are from the annual Returns table and spend to date is from another table and therefore reflecting incorrecly. Please help

 

calculation

Revenue+Cost_savings-Cost_incurred/SpendToDate*100

 

DAX

ROI =
VAR _Revenue = CALCULATE(SUM('Annual Returns (2)'[Value]),FILTER('Annual Returns (2)','Annual Returns (2)'[Measure]="Revenue"))
VAR _Cost_savings = CALCULATE(SUM('Annual Returns (2)'[Value]),FILTER('Annual Returns (2)','Annual Returns (2)'[Measure]="Cost savings"))
VAR _Cost_incurred = CALCULATE(SUM('Annual Returns (2)'[Value]),FILTER('Annual Returns (2)','Annual Returns (2)'[Measure]="Cost incurred"))
VAR _SpendToDate = CALCULATE(SUM('SDG Goals'[Spend To Date]))
VAR _ROI = ((_Revenue+_Cost_savings-_Cost_incurred)/_SpendToDate)*100
RETURN
_ROI
 
 
Kind Regards 
Zaynah
2 REPLIES 2
v-angzheng-msft
Community Support
Community Support

Hi, @Zaynah16 

 

Could you please consdier sharing more details about it and posting expected result so it is clear on what needs to be implemented?  And It would be great if there is a sample file without any sesentive information here.

It makes it easier to give you a solution.

 

 

 

Best Regards,
Community Support Team _ Zeon Zheng


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

amitchandak
Super User
Super User

@Zaynah16 , n such cases you need have common dimensions like date , item etc and analyze data against them

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

https://www.sqlbi.com/articles/the-importance-of-star-schemas-in-power-bi/

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.

Top Solution Authors