Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
NZFei
Partner - Specialist
Partner - Specialist

How to build a table with fix dimension using Sense Widget

Hi community,

1) Say in a Sense application I have a field called "City" and a measure "Sales".

2) I want to build a table widget that has one dimension and one or many measures.

3) I need the dimension to be hard coded to use the field "City".

4) I need the measures to be loaded from the widget component.

The typical html codes to build a table widget are like this:

<table border="1">

<thead>

<tr>

  <th ng-repeat="head in data.headers">

   {{head.qFallbackTitle}}

  </th>

</tr>

</thead>

<tbody>

<tr ng-repeat="row in data.rows">

  <td ng-repeat="cell in row.cells">

   {{cell.qText}}

  </td>

</tr>

</tbody>

</table>

<div ng-if="data.rows.length === 0">

Please add dimensions and measures.

</div>

This typical table widget will load all the dimensions and measures from widget components (so whatever users have defined in the front). How can I hard code the dimension to be one field meanwhile the measures are loaded as what users define? (I'll hide the dimension setting so that users can only see the measure panel).

If this can be sorted out, I should be able to build a container that has many tables. These tables have same measures but the dimensions are different (I'll replace the fixed field "City" with variable). So this widget will look like a container but will be used to achieve the cycle dimension function as we have in QlikView.

Thanks.

Fei

2 Replies
NZFei
Partner - Specialist
Partner - Specialist
Author

If measures have to be hard coded, that is fine. I can replace them with variables too.

NZFei
Partner - Specialist
Partner - Specialist
Author

Maybe I can simplify my question to this:

How to defined the dimensions to some field names and define the measures to "sum of some fields" in widget html codes without using the default data component coming with Sense widget?

Thanks.