Forum Discussion
Calculated Column: Rolling Maximum by Label (or high water mark)
- 6 years ago
For your case, i would suggest you use Date hierarchy in the x-axis, since there are to many day in the axis, so the calculation will be very slow, so you'd better just use Year-quarter-Month in the visual, do not use dim day any more.
here is sample pbix file, please try it.
Regards,
Lin
Can you provide more context behing Laggy?
is the measure taking to long to calculate when you select slicers?
are you using this in a measure or calculated column?
need a bit more info to try and help
- Power_BI_Help6 years ago
Helper I
amitchandak That seems to grab the max value within the day across the different IDs but does not create a rolling max per ID.
What I was looking for:
ID // Date // Value // Max1 // 1.1 // 40 // 40
1 // 1.2 // 30 // 40
1 // 1.3 // 50 // 50
2 ...
Anonymous here is a link to the file that replicates what I am talking about. My charts on the actual file take ~40 - 60 seconds to load and I am planning to scale the file much more significantly (my file has about 5 IDs). And yes, when changing different factors and parameters needing to reload (or drilling down) takes a while. Ultimately, looking for a less computationally intensive way to calculate this. I was thinking that if I created a calculated column that had preprocessed the rolling maximum value it would cut down on load time significantly.
https://1drv.ms/u/s!AqA0zdOdqkphhU41gG8baO20fZTq?e=2K4VPX
Thanks for the help so far!
- amitchandak6 years ago
Super User
Power_BI_Help , it can if the ID is present in the visual table
Else put in calculate and force Id using values(Table[ID])
- Power_BI_Help6 years ago
Helper I
amitchandak
The function seems to grab the last non blank value (i.e. the same day) not the maximum value of all the dates leading up to that day. I attached a photo with the formula you've stated and the incorrect graph it creates when compared to the correct chart on the left. The calculated column does the same. It is not an all time high value for the column up to that date....Ideas?
I appreciate the comments.