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
Anonymous
Not applicable

DAX

Hi,

 

I want to need with help with my measure. There's no error but the numbers don't look right. I'm trying to add a calculated column from query 1 and a column from query 2.

 

Imbalance = query1[residue value]+query2[flow value]

 

where residue value = query1[new flow value]+query1[shrink volume]

 

New flow value and shrink volume are again calculated columns and the values match with my data and looks right.

 

I'm not able to figure out the calculation for Imbalance. Please let me know if anyone knows the solution.

 

 

7 REPLIES 7
az38
Community Champion
Community Champion

@Anonymous 

do you have relationships between tables?

if so, try 

Imbalance = query1[residue value]+ RELATED(query2[flow value])

if not, it will not be summed up or you have to define rule whats exactly cell [flow falue] from all table2 should be added


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38 I do have relationship between the tables and it's based on the dates. 

 

But the meters in table 1 and the meters in table 2 are different (which means they have a same column but different values and flow value doesn't exist in table 1). 

 

May be I can filter based on the meter I want to show for table 2. Though I'm not sure how to filter that out. 

az38
Community Champion
Community Champion

@Anonymous 

as @parry2k mentioned data sample would make the solution find process more easier 🙂


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Anonymous
Not applicable

@az38 

@parry2k 

The formulas i used

Imbalance = sum(query1(residue available)+sum(query2(flow value)

Residue available = query1(new flow value)+query1(shrink volume)

new flow value = if(sum(query1(flow value)>[limit],77000,query1(flow value)

limit = 77000

shrink volume = query1(new flow value)*query1(shrink %)

shrink % = 0.3581

@Anonymous you should have a dimension for meters means a table with the unique value of meters and relationship with query 1 and query 2, in visualization use meter from this new meter dimension and all the formula will work as expected.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Anonymous share sample data and expected result. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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