Sorting Virtual/Created Column in Interactive Grid - oracle-apex

I'm not quite sure whether the description for the column I'm working on is proper, so bear with me.
I got an Interactive Grid that I'm adapting, and it's supposed to work such as this:
It should select a name on the first column (an autocomplete field), followed by 3 columns, each with a checkbox. I need to order the data in the grid by the name in the first column. Problem is, I can't use an "order by" in the select statement, so I need to use APEX's "Column sorting".
The column for the name, however, isn't shown in the list to select the order by value. I only get the 3 checkboxes as an option to order it.
I tried having a copy of the name column, but this time, hidden (and not an autocomplete field), but it doesn't work either. Is there a workaround for this?

The IG will only allow you to sort by columns that have been enabled for sorting. By default, only columns of certain data types and maximum lengths are enabled for sorting, but you can override this for each column in your IG definition.

Related

Power BI Combining Columns and use lookup

I have two reports: first report has a column with sponsor names (name: Sponsor) and the other report also has sponsor names but written differently (name: Companies). Example:
**Sponsor**
Apple
Target
Amazon
IBM
Samsung
**Sponsor (Other)**
Apple Inc
Target LLC
Amazon Marketplace
IBM Computers
Samsung Company
I have appended these two columns so that they are in the same report called Sponsor_All, column names the same as above. What I would like is to create a new column where it would pull in the names from the sponsor column and change the name of the Sponsor (Other) column based on a lookup table so that all of the names are labeled like the sponsor column. Hope thats makes sense.
It looks like what you need is conditional column of some sort.
First thing I would recommend, when you append the two tables, if column names are the same it will append values from both tables into one column, instead of having two columns with different name and a bunch of null values. After that you can either add Conditional Column and hard code the values (so it will be something like: if Sponsor starts with 'Apple' then 'Apple' etc.).
This is not the best approach though, cause you will have to maintain these conditions manually. Better if there's some sort of pattern that you can notice, e.g. in your example I see that to get from Sponsor (other) to Sponsor you just need to extract the first word. If this is the pattern you always have you can use Custom Column and use formula to extract only the first word.
Lastly, if you already have some sort of lookup table you can merge it (after appending together Sponsors and Sponsors(Other) into one column) and use fuzzy lookup option. In all honesty though I never used it and not sure how good it is. If it gives you good enough result you can "clean it up" in next step with custom or conditional column.

Is there a way that POWERBI does not agregate all numeric data?

so, I got 3 xlsx full of data already treated, so I pretty much just got to display the data using the graphs. The problem seems to be, that Powerbi aggregates all numeric data (using: count, sum, etc.) In their community they suggest to create new measures, the thing is, in that case I HAVE TO CREATE A LOT OF MEASURES...Also, I tried to convert the data to text and even so, Powerbi counts it!!!
any help, pls?
There are several ways to tackle this:
When you pull a field into the field well for a visualisation, you can click the drop down in the field well and select "Don't summarize"
in the data model, select the column and on the ribbon select "don't summarize" as the summarization option in the Properties group.
The screenshot shows the field well option on the left and the data model options on the right, one for a numeric and one for a text field.
And, yes, you never want to use the implicit measures, i.e. the automatic calculations that Power BI creates. If you want to keep on top of what is being calculated, create your own measures, and yes, there will be many.
Edit: If by "aggregating" you are referring to the fact that text values will be grouped in a table (you don't see any duplicates), then you need to add a column with unique values to the table so all the duplicates of the text values show up. This can be done in the data source by adding an Index column, then using that Index column in the table and setting it to a very narrow with to make it invisible.

Displaying nothing in card values until a single slicer selection is made

Current setup:
I have a basic report with a number of charts on the page that are all controlled by once Slicer element at the top of the page.
As required, the default selection of the slicer is "All", which shows all data across the charts as is required. Once you filter on this value, the charts all filter as normal to the value of said slicer. All good so far, all working and happy with that.
Issue:
At the top of the page, I have 4 cards, these are all counts and sums. These cards behave the same way. When no value is selected in the slicer, ALL of the data in these cards is summed and counted (as you would rightly expect) and when the slicer has a value, these cards display the correct values as per the slicer selection.
This default behaviour is not what I am looking for with respect to the cards. I only want the cards to display a value when the slicer has one single selection. Multiple selections or "All" should display blank, 0, n/a or something of the sort in the cards values.
As far as I understand, the default way of handling this is to create another measure which sets "Y" or "N" and then add this in as a visual level filter, only showing values when the measure is set to Y: EG
SlicerCheck = if(calculate(distinctcount([SlicerColumn]),allselected([SlicerColumn]))=1,"Y","N")
Other options suggest using functions that are not available in Direct Query mode.
This does not work for cards by default. Does anyone know a good way to achieve this solution?
Thanks
Damon
I would approach this by adding conditions to my count and sum measures. E.g.
SumForCard = IF(HASONEVALUE([SlicerColumn]), SUM(TableName[ColumnToSum]), BLANK())
What you can do with the new feature of Field Parameters (check in Preview features):
Create a Column Called None with all blank values of ""
Create a Field Parameter to select None field as well as the other fields you want (this lets you combine the fields together into 1 Slicer).
Make Field Parameter into a Slicer.
Now you will have a Slicer with None option that will give a blank result. Select for this as the default to not show any results. Save the dashboard in this state to keep the selection this way. You can select the other fields to populate data.

Toad for Oracle - Copy Column from Columns Tab without all details

An arbitrary behavior in Toad that annoys me when composing my queries.
It is not a problem really, rather than an annoying issue.
If you describe any table in toad, or clicked on the table name from the Schema Browser, in Columns tab, copy and paste a column
Sometimes you get the column name only, and sometimes you get the column name with the details of the column {name length data type...etc}
When does toad coy the column name alone, and when does it copy the entire column description?
I searched many SO questions for something related, and google trying to understand how to copy only column name, but I didn'y find any reference at all related tho this.
While in Schema Browser,
select any table and
navigate to "Columns" tab (that's what you're doing anyway).
Right-click, a menu should open.
It contains the Row select item. If it is checked, when copy/pasting a column, you'll actually copy the whole row.
Therefore, uncheck it.
Make sure you click on a column name when copy/pasting it; otherwise, you'll copy a column value you clicked on (such as Data Type or Null).

Conditional/cascading/dependent drop-down list

I am essentially trying to do that this guy is trying to do:
Excel drop-down list using vLookup
I've gone through the steps and since my data set has about 400 different drop down options I am hoping there is an easier way than naming ranges. I have a list of about 400 different account names. Each of these account names is tied to a household and identified by the household ID number. A household can have anywhere from 1-5 account names. I would like for my drop down menu to be able to identify a household ID number and then provide the drop down with the account names associated with it.
Example:
Where household Id number is the identifier.
I've gone here as well http://sites.madrocketscientist.com/jerrybeaucaires-excelassistant/data-validation/dynamic-indirect and am trying to find a way to save on some of the manual work.I am a total newbie so thank you in advance for any help you can provide.
Let's pretend you have three worksheets. The first worksheet, Sheet1, is the sheet that your users will be looking at and it has the drop down lists. We'll say that the cell containing the first drop down option is in B1 (the one with about 400 different options) and the cell containing the dependent drop down is in B2:
On your second sheet, which we'll call MasterList, is all of the data options and the corresponding data. Row 1 is a header row; Row 2 and down is the actual data:
On your third sheet, which we'll call DropDownLists, is where the magic happens. It first needs to have a list of all the unique data options. I've put that in column A. You can get the unique data options from your master list through whatever means you prefer (Advanced Filter, Pivot Table, formula, VBA, etc). That list of unique data options is the basis of your drop down list for Sheet1 cell B1. Then in cell B2 of DropDownLists and copied down as far as needed to guarantee it will grab all data associated with the selected Data Option, use this formula (adjust sheet names and ranges to suit your actual data):
=IF(OR(Sheet1!$B$1="",ROW(B1)>COUNTIF(MasterList!$A$2:$A$10000,Sheet1!$B$1)),"",INDEX(MasterList!$B$2:$B$10000,MATCH(1,INDEX((MasterList!$A$2:$A$10000=Sheet1!$B$1)*(COUNTIF(B$1:B1,MasterList!$B$2:$B$10000)=0),),0)))
This makes your DropDownLists sheet look like this:
Lastly, we need to make that list (data based on the selected Data Option) a dynamic named range. I named it listFilteredData and defined it with this formula:
=DropDownLists!$B$2:INDEX(DropDownLists!$B:$B,MAX(2,ROWS(DropDownLists!$B:$B)-COUNTBLANK(DropDownLists!$B:$B)))
Then for Sheet1 cell B2, use Data Validation and define the list with =listFilteredData and you will get results as shown in my example.
Practice with this.....it will get what you need.
Your data will have to sorted for this to work.
Sorted Data
Data Validation for Shows
Data Validation for Episodes
This formula in the data validation box
=OFFSET($A$1,MATCH($E$4,$A:$A,0)-1,1,COUNTIF($A:$A,$E$4),1)
Enter the array formula to find the Duration
Must be confirmed with Ctrl & Shift & Enter
=INDEX($C$4:$C$18,MATCH(1,(E4=$A$4:$A$18)*(F4=$B$4:$B$18),0))