4 Replies Latest reply on Jul 30, 2018 4:10 PM by swaroop.gantela

# Sum daily max values and graph

I am new to tableau and having trouble plotting a line depicting a daily aggregation of a group of (devices) max values.  From my research thus far, I believ the solution would be using the table calculation  but data returned is the max of a single device (dimension).  My erroneous formula is [TOTAL(MAX([Load]]))].  Any help would be greatly appreciated.

The desired data can be shown in a text table thru "Analysis" and showing row totals when set up accordingly.

• ###### 1. Re: Sum daily max values and graph

Phil,

Welcome to the Forum.

I may not have full caught the gist, but I think there are ways

to calculate it by table calculations or by level of detail calcs.

In the workbook v10.3 attached in the Forum thread,

I used the Superstote Dateset as an example.

I have days along the x axis, and sales along the y axis.

For each day, there is a dimension ([Segment]) with three possible values

and then there are multiple values within each Segment.

What I understood the goal to be was to look at each Segment,

find its max value, then for a given day sum up all the max values.

By table calculations

[TC Max per Segment]:

IF FIRST()=0     // because of multiple rows per segment, need only the first one

THEN WINDOW_MAX(SUM([Sales]))

END

[TC Sum Maxes]:

WINDOW_SUM([TC Max Per Segment])

By LOD

[LOD Max per Segment]:

{ FIXED [Order Date (Days)],[Segment]:MAX(

{ FIXED [Order Date (Days)],[Segment],[Product Name]:SUM([Sales] ) } ) }

[LOD Sum Maxes]:

{ FIXED [Order Date (Days)]:SUM([LOD Max Per Segment] ) }

Of note, for the table calculation method with its need for all dimensions on a shelf,

it became difficult to plot the sum of the maxes as a line.

1 of 1 people found this helpful
• ###### 2. Re: Sum daily max values and graph

Thank you for the response.  The example you went thru is really close, however, I could not modify or duplicate the results for my report.  Numbers were crazy high or giving calculation errors when I thought I was just replacing the appropriate fields and using your formulas.  Apologies, I know this should be easy, but I am struggling early with Tableau functions.

Attached is a screen shot (sorry, we are sticklers on the network security).  My totals are there thru the Analysis summation totals but I am looking to graph these values over time.

For example, I want to trend the following:

1. select "category" filtered fields summed installed vs. load, trended over time - yellow highlight of attached

2.  max device loads summed and trended by category - installed v load, trended over time - orange highlighted fields

Much thanks for the assistance again.... • ###### 3. Re: Sum daily max values and graph

All good.  Thanks for the direction Gantela!

• ###### 4. Re: Sum daily max values and graph

Phil,

Apologies for delayed response,