6 Replies Latest reply on Mar 18, 2016 10:10 AM by Niranjan Banarjee

# Line Chart with Default Grand Total

Hi,

Can we create Line Chart with Default Grand Total as below.The  line chart with Time as X-axis and Max,Min,Avg as 3 lines.

• ###### 1. Re: Line Chart with Default Grand Total

Hi,

I believe I've created a workaround for what you're trying to accomplish. I've mocked it up with superstore data, but you can apply the technique to your data. I've basically created table calculations for each of your metrics. So, you'll want:

RUNNING_AVG(Avg_OOS)

RUNNING_MIN(Min_OOS)

RUNNING_MAX(Max_OOS)

Computing along your Time field, the final row should reflect the "Grand Totals" you see in your crosstab. From there, you can use a filter to exclude all other rows:

INDEX() = SIZE() computed along Time. Then, you'll just need to place all three measures into measure values, place on the row shelf, and then place Measure Names on the Details tab in the marks card. Let me know if this is helpful.

Thanks,

Ben

• ###### 2. Re: Line Chart with Default Grand Total

Great solution Ben,

I might also suggest LoDs over the Table Calc method. Where you set the dimension declaration to the DATETIME.

That way you get the "Grand Totals" at a lower level of dimensionality, and don't have to fiddle with INDEX() = SIZE(), partitioning, etc.

That said, it depends on the datasource and grain. Using the Table Calc method may yield better performance.

Regards,

Rody

• ###### 3. Re: Line Chart with Default Grand Total

Hi BEN,

What you are saying is correct , but in my case I am using frequency for the Table calculation.

In my case the data in the back end is in text not numbers. Thats why not getting the option of Max/mIn /Sum/Avg in the measure.

Please refer to the attachment where in the Red Outlined column numbers reflecting should give me Max/Min/Avg and not consider rest numbers.

Post it, I wanted to have a  line chart with the MAX ,Min, & Avg lines.

• ###### 4. Re: Line Chart with Default Grand Total

Hi RODY,

What you are saying is correct , but in my case I am using frequency for the Table calculation.

In my case the data in the back end is in text not numbers. Thats why not getting the option of Max/mIn /Sum/Avg in the measure.

Please refer to the attachment where in the Red Outlined column numbers reflecting should give me Max/Min/Avg and not consider rest numbers.

Post it, I wanted to have a  line chart with the MAX ,Min, & Avg lines.

• ###### 5. Re: Line Chart with Default Grand Total

Hello Niranjan,

Not sure I fully understand.

Can you please provide an example workbook?

This will allow us to better understand your situation, and help get you to a solution.

Regards,

Rody

• ###### 6. Re: Line Chart with Default Grand Total

Sorry due to some reason i am unable to share the workbook and am new to Tableau .

Trying to  give you a Example- "Day" is a column label with Monday, Monday,Tuesday, Thrusday,etc.But, the sample book shared by BEN had numbers in the data hence the measure is activee for him  and not in my case as my data is in Text.

I am trying to calculate the %.And the then in that the MAx %,Min % & Avg % of the particular column to be identified and then create chart with the grand Total.

Hope, it throws some light on my requirement.