objectscript / LightPivotTable

Lightweight pivot table representation for MDX2JSON source for InterSystems Cache
MIT License
3 stars 4 forks source link

If the filter returns nothing LPT always shows listing #14

Closed evshvarov closed 6 years ago

evshvarov commented 6 years ago

And there is no way to get back after that even if the filter is changed to the option with data: it shows listing again.

nikitaeverywhere commented 6 years ago

Please provide an example link. Thanks!

evshvarov commented 6 years ago

buglpt

evshvarov commented 6 years ago

Take any dash with LPT with filter, which can return empty results. turn on this filter, see the listing and you never come back to pivot view, only listing.

nikitaeverywhere commented 6 years ago

MDX before applying filter: SELECT {[Measures].[Units Sold],[Measures].[Amount Sold]} ON 0,NON EMPTY {[Product].[P1].[Product Category].Members,%LABEL([Product].[All Product],"All Products","")} ON 1 FROM [HOLEFOODS] MDX after applying filter: SELECT {[Measures].[Units Sold],[Measures].[Amount Sold]} ON 0,NON EMPTY {[Product].[P1].[Product Category].Members,%LABEL([Product].[All Product],"All Products","")} ON 1 FROM [HOLEFOODS] %FILTER %OR({[DateOfSale].[Actual].[YearSold].&[NOW] }) MDX after applying first filter again: DRILLTHROUGH SELECT FROM [HOLEFOODS]

Hence LPT displays listing. Must not be an issue in LPT as:

image

changeBasicMDX is triggered by DSW and changes MDX to DRILLTHROUGH. I am closing this issue here and will open one in DSW.

nikitaeverywhere commented 6 years ago

My apologies for focusing on the issue which is not primarily described here. Fixed with 8d5c573b00bc55aa62e1678907f75813e5da1854. Fix available in v1.8.13.