Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I have a basic dashboard in which I want to calculate the running total of a set of values, calculate the high water mark and calculate the difference from the high water mark. This is a snapshot of my dashboard.
The data comprises values from two data sets and I want the calculations to update based on the selection of each individual data set or both combined.
I have created a measure to calculate the Running Total as below. This calculation works.
Running Total =
CALCULATE (
[Total Values],
FILTER ( ALL ( 'Data' ), Data[Index] <= MAX ( Data[Index] ) )
)
The High Water Mark is the highest value in the running total until a new high is reached. For example:
I have created a measure to calculate the High Water Mark as below. This calculation works.
High Water Mark =
MAXX (
ADDCOLUMNS (
FILTER ( ALL ( 'Data' ), Data[Index] <= MAX ( Data[Index] ) ),
"Running Total", [Running Total]
),
[Running Total]
)
The Difference from High Water Mark is the difference between the High Water Mark and the Runnnig Total. I have created a measure to calculate this as below. This calculation works.
Difference from High Water Mark = [Running Total] - [High Water Mark]
The challenge I have is that when I select a single data set the Running Total, High Water Mark & Difference from High Water Mark calculations remain based on the combined data set (Dataset1 & Dataset2).
I have an index column to order the individual data values as there are instances where individual data values ocurr on the same date. I wondered if the solution was to somehow create a dynamic measure which would be either an index calendar which would comprise the individual data values from the selected data set which I could then reference in my Running Total and High Water Mark measures.
I am not an experienced user of Power BI and I am unable to resolve this issue with my curent level of knowledge therefore if anyone in the community can help I would greatly appreciate it.
I don't know how to attach my PBIX template but this is a wetransfer link to it...https://we.tl/t-LSBoXYMD3i
Thank you for any help you can provide.
Neil
Solved! Go to Solution.
Hi @DataNinja777 , thank you for your response.
I didn't need to refer to the link you kindly shared as I realised that in my filters I had selected ALL instead of ALLSELECTED. I changed to ALLSELECTED and it works as intended.
Thanks,
Neil
Hi @Burtoninlondon ,
A widely used technique to make the measures dynamic with a slicer selection is to create a harvester measure in combination with a disconnected slicer created from a disconnected table. I attach a classic article on this topic.
https://p3adaptive.com/dynamic-topn-reports-via-slicers-part-2/
Best regards,
Hi @DataNinja777 , thank you for your response.
I didn't need to refer to the link you kindly shared as I realised that in my filters I had selected ALL instead of ALLSELECTED. I changed to ALLSELECTED and it works as intended.
Thanks,
Neil
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
41 | |
35 |
User | Count |
---|---|
107 | |
56 | |
52 | |
48 | |
40 |