Qliksense; dynamic dimensions for table - data-science

I'm trying to create a "dynamic" dimensions for a table in Qliksense. In Qlikview, I was able to do this by creating buttons that assign a value(field) to a variable, and then simply use the variable as the dimension in the table. This does not seem to work in Qliksense. As an example: I am trying to create a table that shows the total sales volume, number of transactions, average order value and conversion. I want to be able to toggle between the dimensions merchant country, consumer country and merchant. How can I make this happen?

It should be the same approach as QlikView.
(Using QS June 2020 version)
created a variable called vDimension
created 2 buttons
button 1's action is to Set variable value (vDimension) to [My Field]
button 2's action is to Set variable value to [My other Field]
created a table and for the dimension added =$(vDimension) (and whatever measures)
With this setup whenever one of the buttons is pressed the table's dimension is changed as well

Related

Calculated Attribute - Min and Max Valid Date

We have some data inside a table (Dimension) with historical values.
Like this (Small example)
ProductId is our Primary Key (and then is unique)
Code is our Business Key
Color and Type are our historical values
In Analysis Services (Tabular mode), our users want to build a report on that values.
Client usage Could be:
(1) If they only want to see the code ('CAR' in our example) the result would be:
(2) If they want to see the code and the Color:
Same for all the attributes that we can have and all the combinations.
Do you know how to solve this?
Can we add some logic in a calculated attribute
Thank you,
Arnaud
In essence, you want to aggregate by date? So, for any set of attributes you put in your pivot table, you want to show the earliest ValidFrom date and the latest ValidTo date that applies?
To accomplish this in SSAS Tabular, import the table and hide the columns ValidFrom & ValidTo. (To hide a column, right click it in Visual Studio and select Hide from Client Tools.)
Then, create 2 measures. For example:
Valid From := MIN([ValidFrom])
Valid To := MAX([ValidTo])
Note the extra space in the names to distinguish them from the column names. You could also call them something completely different. (E.g. Earliest Valid From Date)
When people connect to your cube, people will use these 2 measures rather than the columns from the original table. (They won't even see the columns because you've hidden them.)
If their pivot table includes all the attributes above (Product ID, Code, Color, Type), then the table will look exactly like your original table. If they only show Code, then your table will look like your (1). If they only show Code & Color, then your table will look like (2).

Categorical Variable content in world map in tableau

I have listed a sample data set. I need to get details of the different elements in the categorical variable over the map while hovering over the countries.
--Dragging and dropping the categorical variable just displays the values for the first element.
the variables used are:
country (geographic)
sales (numeric)
furniture (containing 'table' and 'chair')
I need to get details of sales of chairs and tables over the country on the map while hovering over the countries.
Thanks for the help
the sample data set as seen in the image
I would use the creating a graph in a tooltip hack to solve this problem. The issue is that the Level of Detail of your data does not support the visualisation you want to make.
Do the following:
1) Create cohort calculated fields: You need to separate a measure so that it is specific to one member in a dimension (basically a cross tab).
For you this means creating a calculated field per furniture type.
e.g. Chair Sales Cohort =
if [Furniture] = 'chair'
then [Sales]
END
Repeat this for each furniture type
You can then drag each of these onto the tooltip pane and you will have tooltips :)
If you wanted to get fancy follow step 2 and 3 from this link to make it a bar chart instead of just a number in a tooltip. make a bar chart in tableau
Good luck !

SSAS combining line and header quantities into one measure group

I have a fact measure group called production it is linked to a fact dim Production details. This contains production information at line and header level. If i am selecting line level items i expect the grand totals for headers to sum the distinct value (not sum dupes) for each order. There doesn't seem to be an option in excel to specify which columns you want to grand total when connected to a cube. How do i get around this?
This is the wrong design. I would change your cube and move the production header level metrics to a new fact table which has all the same dimension keys except for the Component Item dimension.
You can look for a property on the measure group called IgnoreUnrelatedDimensions. The default will repeat the header value for each item but not double count for the subtotals. Changing that setting to False will make the header values null at the item level.
But I suspect instead of using this setting you should use a many-to-many Component Item dimension similar to how we have discussed in the past.

SSAS -How to select a particular attribute when we drag dimension into query editor

I have about 4 attributes in Race dimension as shown in blow
dimension name is Race
1)Race
2)RACE DESC
3)RACE KEY
4)RACE SHORT NAME
when go to cube browse and right click on Race dimension and select add query
as below
1)when i drag Race dimension to browser data panel it showing default Race Attribute data
2)i want show RACE DESC data only
3) at the same time i drag the RACE DIMENSION in Filter panel
4) i want show RACE DESC Attribute only
5) i don't want set attributehierarchyvisible =false
how do i achieve my above requirement
Thanks for the help
Create your own user's hierarchy and place it on the 1st place in dimension hierarchies part of screen. This will let SSAS to use it.
Here Report Date hierarchy is selected by default.
And Product Categories on the image below:
UPDATE
Here is detailed explanation:
Now you have 5 flat hierarchies and server takes first alphabetical one by default, like this (Count is measure here):
To fix this, you need to disable attributes hierarchy, which you want to be selected by default:
Than rename attribute, to be able to create user's hierarchy with the same name (so for users this will be identical as previous flat attribute hierarchy):
Finally, process this dimension again, and when you drag dimension, it will show your first user's hierarchy, which is State in our case.
Hope this helps.
UPDATE-2 (New example with races)
To achieve this, you need to do the same as described in UPDATE #1:
Rename RACE DESC to some other name (e.g. RACE DESC Attr) and disable it's hierarchy visibility by setting attributehierarchyvisible = false
Create user's hierarchy on this attribute with desirable name: RACE DESC
Process dimension.
That's all. Now default attribute will be RACE DESC. It's hierarchy is not disabled, just it's showing priority is changed to be the 1st one.

Xrm.Page.ui.getFormType() returns 2 when create order from quote

When i am creating an order from quote, in onload Xrm.Page.ui.getFormType() returns me the value 2.
but the form is in create mode, so should return 1.
When you "win" a quote and a Sales Order is generated, there is no Create state presented by the UI - the system creates the new record in the background and then displays it. When you are presented with the new Sales Order through this process, it already has a record ID so Xrm.Page.ui.getFormType() will return 2, which is the Update state.
The only way to get the Create state (1) from Xrm.Page.ui.getFormType() would be to manually create a Sales Order. However, if you do this you will lose much of the convenience the system does automatically for you, such as copying over all fields with the same name (essentially duplicating the Quote data into the the new Sales Order).