Hi Team, cc: <@U01N003F0RM> <@U02SNBLDP8X> <@U01Q...
# gooddata-ui
Hi Team, cc: @Martin Burian @Peter Plochan @Ivana Gasparekova I need a way to get details of MeasureValueFilter as we do for PositiveAttributeFilter and NegativeAttributeFilter using their
Note: we are using Goodata CN and Gooddata UI version 8.11.0. Regards, Prashant
For PositiveAttributeFilter and NegativeAttributeFilter, I am using the following query.
uris: elementUris,
@Jan Soubusta @Peter Plochan Hi Team, any update on the same?
Hello, MeasureValue filter do not use attributes, therefore it does not have displayForm (label) as these are just view of the attributes. Measure value filter references a measure. In what detail are you interested in?
SPI service that you want to to get information about measure referenced by the filter is
If you are looking for measure values, based on your example for attribute display form, these cannot be obtained in similar way as what you (possibly) asking about is a execution of the report: measure sliced by some attribute(s), therefore you would use AFM and
SPI service that can get you values of a measure in various contexts.
Is that what you are after?
Hi @Petr Dolejsi, I need to get the title of measure.
I have the measure value filter in this format: { "measureValueFilter": { "condition": { "comparison": { "operator": "GREATER_THAN", "value": 1 } }, "measure": { "localIdentifier": "<some_id>" } } }
In this case
points to a measure in either AFM or in
, depends where you see this information). You will find it in one of the measure buckets. There will be a ref of the measure or its current title/alias.
From which structure you got the filter you posted?
The filter just references this measure. Without the outside context the filter definition itself does not say mean anything. It just defines that it filters some measure referenced by is local identifier that has meaning in the scope of the filter’s parent, not in workspace metadata model (therefore you cannot use SPI to get information about it).
Hi @Petr Dolejsi, I got this filter from insight data.
const insight = await backend
Here, the insight object contains a filters key from where I got this
I have the conditions and local identifier however, I don't have the title of the measure.
I need to display the filter something like
<Measure Title > GREATER THAN [value]
For example:
Sum of Marks GREATER THAN 80
@Petr Dolejsi, I do have a measure bucket definition. So, as per you the only way to get the measure title is to find it in measure bucket definition items against the local identifier I have.
From insight object that you got from
you can call
.bucket.flatMap((bucket => bucket.items)).find(item => item.localIdentifier === measureValueFilter.measure.localIdentfier)
I see. Thanks.
That will get you
object. You can check the correct type via
package and then you will get
object that has
properties. Measure of the insight in our apps shows alias value if it is defined, if not it shows title. This way you should get the measure name.
That makes sense to me. Thanks @Petr Dolejsi.
Good luck with your project 🙌
❤️ 1
Hi @Petr Dolejsi, For InsightView do we have an option where we can fetch the insight irrespective of the user group. For Example, we have two user groups: Admin and Analyst. If I create an insight using Admin user group and then tries to access it from Analyst user group, it shows 404 not found for that insight On debugging, found the following: When we access the insight from Analyst usergroup, it appends <workspace-id>:<insight-id> in the insight url in place of normal <insight-id>
I don’t believe insights are tied to user groups in any way. Unless the other group do not have permission (at least VIEW level) for that particular workspace.
Someone more versed in GoodData CN could help you more, possibly @Peter Plochan?
WS prefixing is going to be changed. Cc @Jiri Schmid
@Jan Soubusta, which version are we targeting for this change? cc: @Balamurali Ananthan @Narinder Kumar @Sheila Loekito @Alex Kearns
Hi @Prashant Sharma, about the accessing the insight: Do your Analyst user group have proper access rights to the workspace where the insight was created? Or do you try to access it from the “child” workspace in the workspace hierarchy? From what you posted above, I can just guess, but I suppose you have something like this: •
group has
access = can “touch” everything in the organization. •
group has access only to workspaces which are not parents in the workspace hierarchy. • You have workspace hierarchy with a parent workspace (let’s say it has
ID) and some child where the Analyst group has access (let’s say it has
ID). ... you performed/tried to perform these operations: • As Admin, you created an insight (with
ID) in
POST /api/v1/entities/workspaces/ws-parent/visualizationObjects
). • As Analyst, you wanted to access this insight in
GET /api/v1/entities/workspaces/ws-parent/visualizationObjects/insight-id
) -> you’ll get 404 because the you don’t have access rights to a ws-parent workspace. • As Analyst, you were able to access this insight in
GET /api/v1/entities/workspaces/ws-child/visualizationObjects/ws-parent:insight-id
) because you have access rights to ws-child and the insight-id is inherited from the ws-parent workspace. Here, as @Jan Soubusta said, the explicit workspace prefixing will be removed in one of next GoodData.CN releases. Please, correct me if I’m not right. Thanks!
🙌 2
Hi @Peter Plochan, Your guess is completely right. Thanks for the confirmation.
🎉 1
Hi @Peter Plochan, @Petr Dolejsi, We have a lot of insights on a page in React. Is there a better way to download the page as PDF or an Image? Regards, Prashant
I’m not sure the support for whole Dashboard to PDF is supported yet. Possibly @Roman Hartig can provide more details.