The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello people,
Let's suppose that I want to monitor the liquid level of 5 tanks - A, B, C, D and E, which have their capacities
We have a table (Liquid Input) for the amount of liquid injected into the tanks with the start and end date/time.
Then we have a table (Liquid Output) for the removal of liquid from each tank with the start and end date/time.
I would like a view of the current amount of liquid in each tank, like this:
Thus, I would like a visualization that shows the current amount of liquid in each tank to take into account the dates/time of liquid withdrawal, for example:
On the 20th we have 300L of liquid in Tank A. In the afternoon of the 21st, another 500L of liquid was placed in the tank. We have 800L so far. Arriving at night, they removed 300L, making the current volume of 500L.
Until the 23rd there was no liquid entry, but there was a 300L removal, making the new current volume of 200L.
And let's assume that the input and output tables are constantly updated.
Best Regards.
Solved! Go to Solution.
Hi @Mentzer ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a measure.
Capacity =
var _input=CALCULATE(SUM('Liquid Input'[Injected Liquid]),FILTER(ALL('Liquid Input'),'Liquid Input'[Tank]=MAX('Liquid Input'[Tank])))
var _output=CALCULATE(SUM('Liquid Output'[Removed Liquid]),FILTER(ALL('Liquid Output'),'Liquid Output'[Tank]=MAX('Liquid Input'[Tank])))
return _input-_output
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Mentzer ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a measure.
Capacity =
var _input=CALCULATE(SUM('Liquid Input'[Injected Liquid]),FILTER(ALL('Liquid Input'),'Liquid Input'[Tank]=MAX('Liquid Input'[Tank])))
var _output=CALCULATE(SUM('Liquid Output'[Removed Liquid]),FILTER(ALL('Liquid Output'),'Liquid Output'[Tank]=MAX('Liquid Input'[Tank])))
return _input-_output
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
this can be done by union both the table and based on "conclution date", input as (+) value and output as (-) value , tank name. if you still feel it difficult, share these tables so that I can copy those values.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
21 | |
18 | |
16 | |
13 |
User | Count |
---|---|
39 | |
38 | |
23 | |
21 | |
19 |