Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
If measures have to be hard coded, that is fine. I can replace them with variables too.
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.