JSFiddle - React, Tailwind, and code Playground
by subbu2803
HTML
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div id="pivot-container"></div>
JavaScript
const pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: true,
report: {
"slice": {
"reportFilters": [
{
"uniqueName": "Region_mapping_region"
},
{
"uniqueName": "Physician_Performance_All_Months_LocationGroupName"
}
],
"rows": [
{
"uniqueName": "Physician_Names_correct_physician_name_"
}
],
"columns": [
{
"uniqueName": "year_month"
},
{
"uniqueName": "[Measures]"
}
],
"measures": [
{
"uniqueName": "Sales",
"formula": "if( sum(\"Physician_Performance_All_Months_Physician_Sales\") <50,0 , sum(\"Physician_Performance_All_Months_Physician_Sales\") )",
"caption": "Sales",
"format": "-n72jtxuqlnj00"
},
{
"uniqueName": "Growth",
"formula": "%differenceofrow(\"Physician_Performance_All_Months_Physician_Sales\")",
"caption": "Growth",
"format": "-18jb1x73xm5t00"
},
{
"uniqueName": "Physician_Performance_All_Months_Physician_Sales",
"aggregation": "sum",
"grandTotalCaption": "Physician Sales",
"active": false,
"format": "unit_3"
},
{
"uniqueName": "Physician_Performance_All_Months_Physician_Sales - PCT",
"formula": "percent(\"Physician_Performance_All_Months_Physician_Sales\")",
"caption": "Physician Sales - PCT",
"active": false,
"format": "percentage"
}
],
"sorting": {
"column": {
"type": "asc",
"tuple": [
"year_month.[June 2024]"
],
"measure": {
"uniqueName": "Growth",
"aggregation": "none"
}
}
},
"drills": {
"drillAll": true
},
"flatOrder": [
"Physician_Performance_All_Months_Sales_Date",
"Physician_Performance_All_Months_LocationGroupName",
...