Dynamic dating diagram

Rated 3.99/5 based on 505 customer reviews

The final piece of code is to create a calculated measure based filter that will be used to help select the date range. The Data Table Date variable will store the minimum value of the [Date] field from the ‘Data Table’ for each bucket on the axis.This will effectively control which rows from the ‘Data Table’ table will be used by the calculated measures on the visual.The DATEADD function can only work with a column reference and cannot use the output of a MAX function.

dynamic dating diagram-18

dynamic dating diagram-33

dynamic dating diagram-15

The MIN function is used to guarantee a single date value.The challenge is if the “Month” slicer uses a field from the data table used to generate values for the visuals it will restrict the rows from the data table available to generate the axis, that no amount of fiddling with row or filter context can over-ride.The same is true when using a field for the slicer from a related table.This is the column we will use in the axis of a visual.This code can be tweaked a number of ways to control when the data table starts and finishes, how many rows per day, as well as the parameters for the random number used for [Units Sold].

Leave a Reply