DeepSeeWeb icon indicating copy to clipboard operation
DeepSeeWeb copied to clipboard

KPI for MDX doesn't work

Open evshvarov opened this issue 2 years ago • 3 comments

Changing the filter causes problem: Screenshot 2022-11-16 at 5 12 10 PM

Reproduced here:

evshvarov avatar Nov 16 '22 16:11 evshvarov

@jakcpto посмотри пожалуйста, что тут не так с МДХ, пока Антону не понятно, какой он должен быть

Lena-Ev avatar Dec 08 '22 11:12 Lena-Ev

Bottom widget has no MDX at all. I think this is a bug and the reason of error message. image

Top widget have this MDX

SELECT NON EMPTY NONEMPTYCROSSJOIN([GenD].%TopMembers,{[Measures].[%Count],[Measures].[Allergy Count]}) ON 0,NON EMPTY {[AgeD].[H1].[Age Group].Members,[AgeD].[All Patients]} ON 1 FROM [PATIENTS]

When I'm choosing a filter in the top widget, filter applies to both widgets:

%FILTER %OR({[ColorD].[H1].[Favorite Color].&[Blue] })

In that case top widget have correct MDX (with filter added), but bottom has corrupted MDX (only filter without SELECT).

jakcpto avatar Dec 08 '22 15:12 jakcpto

There is no MDX, because the bottom widget has KPI, and executes request /MDX2JSON/KPI?Namespace=irisapp with payload {"KPI":"DemoInteroperability.kpi"}. Filters for KPI is not implemented in DSW, I need a way to apply filters to KPI requests. Can you explain how it can be done in mdx2json?

gnibeda avatar Dec 09 '22 11:12 gnibeda

@gnibeda now we have formed /KPI endpoint so DSW can send FILTERS in payload and the results will be filtered.

Example: { "KPI":"DemoInteroperability.kpi", "FILTERS":[ {"name":"[ColorD].[H1].[Favorite Color]", "value":"Green"}, {"name":"[DocD].[H1].[Doctor Group]", "value":"I"} ] }

There is array of objects. It can be array of only one object. "name" and "value" are keys. Name refers to a "path" parameter from filters response.

For multiple selection of one filter, add another object in array:

{ "KPI":"DemoInteroperability.kpi", "FILTERS":[ {"name":"[ColorD].[H1].[Favorite Color]", "value":"Green"}, {"name":"[ColorD].[H1].[Favorite Color]", "value":"Yellow"}, {"name":"[DocD].[H1].[Doctor Group]", "value":"I"} ] }

jakcpto avatar Feb 01 '23 16:02 jakcpto

@Lena-Ev FYI. This is important issue, can solve critical project task.

jakcpto avatar Feb 01 '23 16:02 jakcpto

Done in 3.1.63

gnibeda avatar Feb 03 '23 13:02 gnibeda

@evshvarov check pleaase

Lena-Ev avatar Feb 07 '23 11:02 Lena-Ev