Description: We normally use web intelligence pie chart to show the data using one dimension and one measure.
But what about when we need to use two measure with pie chart. Looks bit difficult. Below is the workaround to fulfil the requirement.
Please note in this we don't have any dimension object.
Requirement:
Let us assume we need to show the below data in pie chart. In the above table we don’t have any dimension objects.
CommissionEarned | CommissionGiven |
20000 | 15000 |
Solution:
- Create a new data provider. Use one dimension objects in the query panel. Now we will write the custom SQL.
Select ‘CommissionEarned
Union All
Select ‘CommissionGiven’
This is will create a one user defined dimension object.
- Now create a new formula with below condition.
If <New DataProvider>.ObjectName=”CommissionEarned” Then Measure object <CommissionEarned> Else <Commissiongiven>. This will bring value of two columns in one column i.e a new variable which is created.
Object from 2nd DP | New Variable |
CommissionEarned | 20000 |
CommissionGiven | 15000 |
This is it. Now we can use above table to show data in pie chart.