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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
lac
New Member

Problems with calculating values

Hello! I don't know how to get the correct number from a table.

 

I need to add and substract several values from a table depending on several conditions. Some conditions are that metertagids have to be 1898,1890,1902,2275 and 463. Also they have to be calculated in the same time period, so for each calculation timestamputc has to be the same.

 

My table is like this where the are several metertagid. So I need to do some calculations where the values are stored in the data column.

 

lac_0-1648189220435.pnglac_2-1648189319520.png

 

 

 

 

 

 

 

 

 

 

 

I prefer to do it in a measure format, but if its not possible it will also work adding a new column to the table.

 

My acutal code is this:

 

C_Agua_Coccion = CALCULATE(SELECTEDVALUE(DataLog[Data]),DataLog[MeterTagId]=1898) - CALCULATE(SELECTEDVALUE(DataLog[Data]),DataLog[MeterTagId]=1890) - CALCULATE(SELECTEDVALUE(DataLog[Data]),DataLog[MeterTagId]=1902) + CALCULATE(SELECTEDVALUE(DataLog[Data]),DataLog[MeterTagId]=2275) + CALCULATE(SELECTEDVALUE(DataLog[Data]),DataLog[MeterTagId]=463)
 
Thanks in advance.
2 REPLIES 2
PaulDBrown
Community Champion
Community Champion

Please share sample non-confidential data





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






ghoshabhijeet
Solution Supplier
Solution Supplier

@lacYour requirement is not very clear. As mentioned, you have to add and subtract several values from the table based on some condition. Can you please elaborate?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.