Is there a way to create parameters in apache superset like we have in tableau?Or is there any way to do same functionality as parameters - dynamic

I want to create a drop down using which user can get the feature of changing the aggregation level of metrics.
For example we have sum(cost) as a metrics in the report. Now we want User should have functionality to dynamically select at what level they want to see the view.Either at category level or subcategory level or gender level.
We tried doing this with the help of filters but didn't get any success.

Related

Query Active Directory using DAX

Given my tabular model, I'm attempting to write a measure that changes behavior, depending upon which role the effective user belongs to. This isn't traditional row-level security (RLS) since I'm not trying to filter by role; just do an if-else, instead.
I've come across the following solution at https://community.powerbi.com/t5/Desktop/DAX-Expression-For-Role-Level-Security-Using-DirectQuery/td-p/489699, which I believe will work, but I'd prefer querying active directory to see if the user belongs to said role, rather than another table on the model.
I've also seen some articles (i.e. https://community.powerbi.com/t5/Desktop/How-to-leverage-Active-Directory-to-filter-the-data-in-Power-BI/td-p/140479) about getting attributes from active directory for Power BI, but nothing that exposes the DAX being used.
Bottom line, if I could get a role name in DAX or call a function to check if the user is in a role, I'd be golden (assuming performance isn't compromised).
Edit: I should add that I'm currently leveraging one of three functions to get the user. USERNAME(), USEROBJECTID(), and USERPRINCIPALNAME().
I ended up giving up on leveraging active directory and did what it appears everyone else is doing (as seen in one of the links posted in my question).
For reference, here's a snippet that illustrates the solution:
EVALUATE
SUMMARIZECOLUMNS (
"Some Measure",
IF (
LOOKUPVALUE('My User'[UsePrivilegedValue], [Name], USERNAME()),
SUM('Some Fact'[PrivilegedValue]),
SUM('Some Fact'[OtherValue])
)
)

How to configure flexible access rules

BASIC PROBLEM TO SOLVE
I am trying to configure flexible rules using user groups and ir.rules in Odoo 10. Basically I want to give users access only to certain records, based on specific values in columns. There are some records that I want to restrict - regardless if it was allowed in another group based on different criteria.
Here are some simplified examples of what I want to accomplish:
1.
(country = 'USA'
or
office= London)
and
vip = false
2.
(country = 'uk'
or
country = 'netherlands'
or
office = London)
etc
To make the access rules flexible, I want to create the following groups:
group_country_usa
group_country_germany
group_country_uk
group_country_netherlands
etc
group_office_london
group_office_new_york
group_office_paris
group_office_tokyo
group_office_st_petersburg
etc
group_no_vips
I have corresponding ir.rules records for each group above:
[('country','=', 'usa')]
etc
[('office','=', 'amsterdam')]
etc
[('vip','=', False)]
Per my testing I do not believe I can do the the above with only using separate ir.rules records.
Is there a way I can accomplish my objective?
I hope the above makes sense and that someone can hint me in the right direction.
Assuming there's a global rule allowing access to all records, I see no problem with using your described ir.rule and res.groups configuration. However, group rules are additive, meaning it is not possible to join ir.rule domains with and like in your example #1. See official docs for more information.

Can a metric use multiple Variables in a dashboard?

Say there is metric that has records from multiple clients
select count(id) WHERE variable
Is there a way to have the metric use multiple variables which are defined in a dashboard? Something like
select count(id) WHERE variable_value1 OR variable_value1.
The metric would appear on a dashboard that has either variable_value1 or variable_value2. I've test using the OR logic, but the metric still shows data from both values instead filtering to whatever variable_value is on the dashboard.
I know a variable as a filter on the dashboard would do the same job, but users (that have unfiltered access to all variables values) want to have a fixed view per variable value in separate dashboard tabs and I'd like to avoid duplicating metrics for each variable value.
This is something that can be done within the metric, but it depends on the data that you are looking at. The metric itself would look something like this:
SELECT <metric> where <attribute> = <attribute_value1> AND <attribute> = <attribute_value2>
You can replace the "AND" with an "OR" within in the metric as well. If you need further clarification, could you please provide a specific example? We would be glad to help you out here.
Thanks,
GoodData Support

SSAS hide measure for certain dimension

How to hide measure or a scope if user choose certain dimension or go to certain dimension hierarchy level?
Thanks.
Try something like this in your MDX script:
FREEZE([Measures].[My Measure], [Product].[Subcategory].[All]);
([Measures].[My Measure], [Product].[Product].Members, [Product].[Subcategory].[Subcategory].Members) = null;
Freeze ensures the next statement won't null out the category level totals. The next statement bulls out that measure for the whole product dimension up to the subcategory totals but not above.
Note this is fine for nulling out meaningless numbers but isn't a security feature. A savvy user could do a drillthrough command to get the product level numbers. Or a savvy user could connect in a special way and clear the whole MDX script for his session so he sees the detailed product data.
For a more secure approach:
If you can null out product data for all measures then setup role based security. In dimension data security only grant access to member Subcategory.All only but uncheck visual totals on the advanced tab so that the subcategory grand total is the real total.
Or setup a second slimmed down Product dimension that only has the top levels not the detailed product levels. Then only tie that dimension to this measure group.
Or create a second measure group that does a group by in SQL and joins to the Product dimension only at the Category level. Thus there is no detailed data only rollups. Then with security control whether a used sees the detailed measures or the summary measures.
On measure properties you can set set visible property to false for the measure you want to hide. Another option is to use perspective and choose again what you want to hide or not.

When relating 3 entities in CRM 2011 using Advanced Find only 2 entities show up in edit columns

I'm trying to create a view in CRM 2011 that will show a few columns from Customers (Account), Orders (SalesOrder), and Order Products (SalesOrderDetail). I already know I need to start at the child-most entity so under Advanced Find I select "Order Products" under Look for. When I do this I'm able to select columns from Orders but unable to select columns from Customers.
Is this even possible to accomplish in CRM?
I'm trying to create the following result set:
Account.Name,
Account.Email,
SalesOrder.OrderNumber,
SalesOrderDetail.NetAmount,
SalesOrderDetail.ShipDate
I verified that you cannot manually add a second link within a view query. To my knowledge it is also not possible to add these columns though javascript. You can get the account name in your view simply by using the account lookup on the Order. If you need for the account email to also be in the view, then I suggest you add this field to the order entity and populate it with post callout logic on the account.
I Second Zach’s idea, but suggest adding a direct relationship between customer and orderdetail . This way you can use fetchxml to show account.email or any other account.* for that matter.
The downside is you’ll need to sync order.customer changes to orderdetail.customer.
The better option is to simply create a report and show that in an iframe or a webresource.
This is not possible even if we edit the fetch xml it wont work