Need a special offer?Find out if your project fits.
+

Remove zero or null values from grid/export/chart

Answered
Ravali asked on May 13, 2019

Hello Team,
Is it possible to remove zero or null from data.
Thanks & Regards,
Ravali N

5 answers

Public
Vera Didenko Vera Didenko Flexmonster May 13, 2019

Hello, Ravali,
 
Thank you for writing to us.
 
Could you please provide more details concerning the desired output?
An illustration would be helpful as well.
 
We are looking forward to hearing from you.
 
Best Regards,
Vera

Public
Ravali May 15, 2019

please find the image. if there n number of values and all the values are zero or null then the entire row should not be displayed nor in export or print functionality
 

Attachments:
image001.png

Public
Vera Didenko Vera Didenko Flexmonster May 16, 2019

Hello, Ravali,
 
Thank you for your reply and for providing an illustration.
It helped to understand the desired behavior better.
 
Removing rows which contain zeros and null values can be achieved in Flexmonster by using Report Filters:
 

reportFilters: [
{
uniqueName: "Quantity",
filter: {
exclude: [
"quantity.[null]",
"quantity.[0]"
]
}
}

]

 
If you wish not to display the Report Filters, they can be hidden by setting the showFilter parameter in the grid options object to false:
 

grid: {
showReportFiltersArea: false
}

 
We have prepared a JSFiddle example for illustration.
 
 
Please let us know if this works for you.
 
 
We are looking forward to hearing from you.
 
 
Best Regards,
Vera

Public
Ravali May 17, 2019

Hello Vera,
We are not getting the required result when adding exclude, we are using SSAS and Angular for flexmonster integration. Please find the JSON object:
{
dataSource: this.getDataSource(),
slice: {
reportFilters: [
{
uniqueName: "[Dim Location].[Location Id]",
filter: {
members: ["[Dim Location].[Location Id].&[50945200]"]
}
},
{
uniqueName: "[Dim Date].[Calendar YM]",
filter: {
members: ["[Dim Date].[Calendar YM].[Year].&[2018].&[5]"]
}
},
{
uniqueName: "[Measures].[Actual]",
filter: {
exclude: [
"[Measures].[Actual].[null]",
"[Measures].[Actual].[0]"
]
}
},
],
rows: [
{
uniqueName: "[Dim GL Codes Groups].[GL Category]",
filter: {
members: [
"[Dim GL Codes Groups].[GL Category].[All].UNKNOWNMEMBER"
],
negation: true
},
sort: "desc"
},
{
uniqueName: "[Dim GL Codes Groups].[GL Group]"
},
{
uniqueName: "[Dim GL Codes Groups].[Description]"
}
],
columns: [
{
uniqueName: "[Measures]"
}
],
measures: [
{
uniqueName: "[Measures].[Actual]",
caption: "Amount"
}
],
expands: { expandAll: true }
},
options: {
grid: {
type: "classic",
showMeasures: false,
showAllLabels: false,
multipleMeasures: true,
showFilter: false,
showReportFiltersArea: false,
showGrandTotals: "on",
showHierarchyCaptions: false
},
drillThrough: true,
configuratorActive: false,
configuratorButton: false
},
formats: [
{
name: "",
thousandsSeparator: ",",
decimalSeparator: ".",
decimalPlaces: 2,
currencySymbol: "$",
currencySymbolAlign: "left",
nullValue: "$0.0",
textAlign: "right",
isPercent: false
}
]
};
 
Thanks & Regards,
Ravali N

Public
Vera Didenko Vera Didenko Flexmonster May 20, 2019

Hello, Ravali,
 
 
Thank you for your reply and for providing a sample report to help solve the problem.
 
 
We would like to point out that the provided solution won't work since extended filters are currently not supported for SSAS.
However, support for extended filters for SSAS has been added to our customers' wishlist and we will notify you in case of any updates on the matter.
 
At the moment the possible way to filter out the data is to remove the corresponding rows from the dataset. 
 
 
Please let us know if you have further questions.
 
 
Best Regards,
Vera

Please login or Register to Submit Answer