Possible to make Aggregate Piechart Legend only display [Expense types] that appear in Rows?

Howdy! I have a Bookkeeping App with [Expense type] column as an Enum. When I make an Aggregate Piechart, charting [Expense type], with “Show Legend” ON, and “Group Aggregate” as SUM:: Amount, “Label type” = Value, the Legend shows ALL of my expense type choices, including the types that do not appear in my database. Ex. “Contractors” is displayed in the Legend, but I have no Rows/Transactions with that as [Expense type], and the Piechart does not show any data for Contractors. How can I make the Legend only display Expense types that appear in one of my Rows? TYTY!

0 3 905
  • UX
3 REPLIES 3

Hi @Stephen_Mattison,

You may wish to create a VC called say [Expense type V] with an app expression for that VC as [Expense type] and show_if as CONTEXT(“View”)=“PieChart View Name”
This VC will basically de link the chart from Enum column [Expense Type]

Then you may create a slice “Chart Slice” such that, the slice has all applicable columns that you used for creating chart view based on table except [Expense type] replaced by [Expense type V]

You may create chart view based on this “Chart Slice” wherein you use chart column as [Expense type V] rather than [Expense type]

Hope this helps.

Hi @Stephen_Mattison,

One more update. After testing ,I realize that one need not even create a slice. Simply use [Expense type V] as the chart column. The Piechart shows only the categories that exist in the rows. [Expense type V] is a text type VC.

OK, thank you again kind Sir! I will apply this and let you know what I come up with!

Top Labels in this Space