Display field in slicer in powerpivot - pivot-table

I have a slicer which has value 'A' and 'B'. can I change it in a way that, wherever it is 'A', should display 'Apple' and 'B' should display 'Banana' without doing any changes in my database tables.

For me this is one of the best things about PowerPivot - the ability to make fields more friendly in appearance without changing the underlying data.
In the PowerPivot table add a calculated column to the relevant table e.g.
=IF('Table'[Code]="A", "Apple", IF('Table'[Code]="B", "Banana"))
You can give this column the name of your choice an use that in the slicer instead. You can further improve the presentation by hiding the original column from client tools via a right click on that column in the PowerPivot window.

How about using a calculated field with a formula that assigns Apple for A and etc. Then use this field in slicer instead of the original field with A and B.

Related

how to create a database field which is the multiplication of two other fields in drupal

I have created a table with fields: products and cost, using hook_scheama that takes values from a form. I want to create a field price which it will be the multiplication of fields: product and cost, and store it in the database. I also want to display the field in the form.
How can I do that? I’m not very experienced in drupal
I think you shouldn't be doing that with custom hooks. There is the module Computer Fields.
Computed Field is a very powerful field module that lets you add a custom "computed fields" to your content types. These computed fields are populated with values that you define via PHP code. You may draw on anything available to Drupal, including other fields, the current user, database tables, you name it. (Feeling the power yet? :) ) You can also choose whether to store your computed field values in the database with other content fields, or have them "calculated" on the fly during node views.

Creating a slicer using DAX in PowerView

I am working to make a dashboard in MS PowerView but having some trouble creating "slicers" for my dashboard. A slicer is basically a filter for the whole dashboard which filters out the whole display based on what is selected. For example, I am working with a survey so if we click on person type 1 under the "person" slicer, only responses from person type 1 will show.
I am trying to make a slicer based on statistical measure type. Basically, I want a slicer with 3 different statistical measures: average, median, and mode. So when "average" is selected only those graphs using the measure of "average" will display.
So far, all I have is a table in MS Access called "measure name" and I have made this a slicer on my table. However, in order for my slicer to work I believe I have to use a DAX formula. Any idea how to do this? I have tried
if(MeasureName[MeasureType] = "Average") but I'm not sure what to put for the true and false.
Any feedback would be appreciated!! :)
You can make a slicer that allows users to choose the measure to be shown in charts on the canvas. But as Rory said, you cannot use it to show/hide graphs. It would just change the measure used in the graphs.
Jason Thomas has a good blog post on creating a slicer to choose measures in Power Pivot. It works similarly in a Tabular model.
Create a table of measures with an ID column.
Create a measure based on that table to find the minimum ID value from the slicer selection. This tells you which measure is chosen.
Replace the measures in your charts with this new measure.
I don't consider this to be against Kimball at all. It has less to do with the dimensional model and more to do with the technological solution required for the desired UI capabilities. Basically, you can have your dimensional model and have this table out outside of that without feeling like you are breaking the rules.
A slicer is usually an attribute of one of your dimensions. When you filter on that attribute the filter applies also to your fact table. So if you have a dimension with three entries: average, median and mode it would be possible to create one fact table that stacks the average, median and mode values so that when the slicer is clicked the fact table is filtered for that attribute.
That will allow you to show the three types on one graph. It won't allow you to show some graphs and not others. And this type of fact table kind of goes against what Kimball might say about fact table design ...

Visual Studio 2013 LightSwitch How to limit options in popup window when adding linked field data?

I have Visual Studio 2013 LightSwitch. My app is deployed to Azure. My SQL database is on Azure. Tables and links are created and working.
Problem 1: In Table A, when adding or updating data, I want to select data from fields in records based on primary key in other tables. Add and update data works. But my popup "X" list is way too long. I want the popup "X" when adding or updating record in Table A to only give me the choice of records from Table B that matches the data I entered in a previous field in Table A, not all the records from Table B.
Problem 2: Then while adding or updating Table A, I want the data from certain fields of the selected record in Table B to be transferred to certain fields in Table A. (Let's say - If I select "ABC" from the popup "X" in Field 2 in Table A, then when I am selecting something from the popup "X" in Field 3 in Table A, I want to select only from the records in Table B that match "ABC" in the primary key field of Table B, not all the records.
Problem 3: If the popup "X" list doesn't include the necessary record to put in Table A, then I want to add a record in Table B to include it in the popup list.
Problem 4: How do I get my popup "X" list to include more than one field? Is creating a new combined field the preferred way?
Problem 4: I also need some good help with user text input and getting the text into my online database. The thought of using an Intrinsic Database gives me the willies.
In your detailed solution, remember I am more familiar with Visual Basic than C#. Thanks.
I'm not quite sure what you mean by popup X list but I'm going to assume you mean an Auto Complete Box control as that would be the default control for linked data. To achieve what you want for problem 1, you need to create a query on Table B with a parameter for the selection field of Table A. You then assign that query to the Auto Complete Box by changing its Choices setting from Auto to your new query. Changing your selection on Table A automatically filters the available selections in your query on Table B.
Beth Massi explains in detail here - there isn't much code involved but her examples are in VB. I'd figure out problem 1 first and then see if that helps clarify the remaining ones.

OBIEE Characteristic Table with dynamic header

I have original data as shown above with a single record. I have name of the field in one column and value in another column. I need to transform make the heading dynamic as shown below.
I tried with table pivot table and trellis, not no success.
You should be able to do this in a pivot table in OBIEE.
Please see my below screenshot. I was able to get my column originally named 'Total Contracted Cases' to now be called 'USD' because that is the value in the column 'Currency Code'. So for you, you should be able to get the column 'PARAM_VAL1' to be called 'COUNTRY' because that is the value in the column 'PARAM_CD1'. See below for my example:
In the second image, be sure to click on the 'Measure Lables' properties to hide the value.
For columns that are not metrics (no aggregation rule set) that will be used in the 'Measures' section of the pivot table, you will have to define an aggregation rule in the column properties dialog box to keep the value from being converted to null. If your data is as you say it is (a single record), then this should not be an issue; you should be able to pick any aggregation rule and not have to worry about dropping data.

SSRS parameters, populating the available fields list

When producing a list of available parameter properties, rather than manually typing each persons name in one by one, is there any way of just populating the data from the table/view which holds all the possible names?
I assume its in the circled box however all that does it let me point to a dataset and then field which I have tried selecting StaffName (being the field that is the one I'm using) if I then run the report it falls over.
Add a new dataset to the report, maybe called StaffMembersDS. The SQL for it might look like:
SELECT Id, Name
FROM StaffMember;
Then assign Name to Label and Id to Value.
BTW if this is related to your last question you're going to run into the trouble that when a user picks a staff member name from the drop down list they are picking only one value. So for your case you might want the Value field to be tied to Name as well as the label. That would allow you to use the query in your last question - SSRS Parameters - which collects related Id values.
SSRS's concept of a query is largely tied to a data set that you define in Report Data.
When you choose 'Use a query', you should be choosing a pre-defined query from Report Data. Of course, the good news is that you can define these yourself.
So let's take your example. You want your possible parameter options to be StaffNames.
Create a new dataset in Report Data. It should return all possible staff names for your report.
Something like:-
SELECT DISTINCT
StaffName,
StaffID
FROM
MyReportViewOrTable
Once you have defined this dataset, you should be able to use it as a source of parameter values.

Resources