How can I group by specific column in Sharepoint online - sharepoint

I'm new to sharepoint and I have question on how to group by specific column that I have json formatting inside it.
Here the question,
I try to create a category column with this JSON
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=if([$StartDate]> #now, 'Upcoming', if([$EndDate]< #now, 'Expired', 'Due'))"
}
and below the issue when try to group by Category,
Mind help point out what I did wrong
Thank you.

Per my knowledge, group by a list through a JSON formatting column is not available.
JSON formatting is just a expression, it does not fill in values in the column.

You'll need to either use Power Auto or use column formula to automatically populate (default value, etc) and fill the designated column (Category). JSON alone won't populate the column values for you since that just modify the exterior view and group by is based on value.

Related

Create Custom Numbering Format Excel

I need to create a formula or custom numbering format that references the Requirement Type returns the requirement ID FR,SC, Etc and numbers the column FR001, FR002, FR003... or for SC001, SC002, SC003... for all of the requirements.
How is this possible?
In my example I created one table for the codes (insert > table) and one for your requirments. To make the formula less complicated I added a helper column for the code which uses a Index/match formula to retrieve the code based on the type. Within the ID column CountIf is used to get the "running" number".
Code =INDEX(tblCodes[Requirement],MATCH([#Type],tblCodes[RequirementType],0))
ID =[#Code] & TEXT( COUNTIF($E$3:$E3,[#Code])+1,"000")

Return array based on titles

I'm, looking for a way to return an array of text based off of titles or headers if you will. My brain isn't working today and I keep struggling to find the best method. I originally was going to have a bunch of IF statements and ran into problems, and I can't seem to figure out if Aggregate is a viable method.
Essentially if "Title 1" is selected from a drop down I would like to return the names within Title 1, and so on. If "All" is selected I would like all to populate from each title. The speed bumps I have is that some names repeat and I only want to show each name once always in alphabetical order. Can someone please get me started on how to tackle this?
In Excel O365 with the FILTER function, you can do this with a helper column (which you can hide, or position elsewhere).
I created a Table and am using structured references, but you can change to ordinary addressing if you prefer.
TitleList is a named range that includes all or your titles (presumeably you will use this for your dropdown).
For the Helper Column, I have it adjacent to your Names column with the formula:
=IF(OR(A2=TitleList),ROW(),B1)
This creates a unique number for each title.
Then, for your formula, under the dropdown, you can use:
=FILTER(Table3[Names],(Table3[Names]<>G1)* (Table3[Index]=XLOOKUP(G1,Table3[Names],Table3[Index])))
where G1 contains the dropdown
With Column B visible:
Some with O365 do not have the FILTER function. If you do not have the FILTER function, you can use:
=INDEX(Table3[Names],AGGREGATE(15,6,1/(INDEX(Table3[Index],MATCH(G1,Table3[Names],0))=Table3[Index])*ROW(Table3)-ROW(Table3[#Headers]),ROW(INDEX($A:$A,2):INDEX($A:$A,COUNTIF(Table3[Index],INDEX(Table3[Index],MATCH(G1,Table3[Names],0)))))))
EDIT
To return a non-duplicate list of ALL of the names, add ALL to TitleList and use this formula instead.
This formula makes a special case for ALL and filters out the rows that contain a Title
=IF(G1="ALL",UNIQUE(FILTER(Table3[Names],COUNTIF(TitleList,Table3[Names])=0)),FILTER(Table3[Names],(Table3[Names]<>G1)*(Table3[Index]=XLOOKUP(G1,Table3[Names],Table3[Index]))))
.imgur.com/apkHh.png

Excel table filter achieving something like an IN statement in SQL language

I'm convinced this has to be something very straightforward - I just couldn't find any stack exchange posts referencing it. I apologize if it's already out there.
I'm trying to filter out a couple of numbers from a long list that I have in an excel table. Something similar to an 'in' clause in SQL, but I'm not using a formula - just trying to use the table functionality in Excel 2010. Any help appreciated on how to input multiple numbers/id's at once.
The closest I've found so far is using advanced filters as suggested here - but it's not quite as simple as keying something into the search bar:
https://superuser.com/questions/623380/excel-filter-a-column-by-more-than-two-values
Thanks
The short answer is no, not really. Within Excel, you can filter with two conditions (via an or), but to my knowledge you can't do more than two.
If you are interested in a hack, here is one.
Create a second table with a list of values you want to filter. Make sure it's a table, not a range, for scalability
Create a new field in your original table, and vlookup your value against the new table. Something like this:
.
=IF(ISNA(VLOOKUP([#UID],NewTable[[#All],[FilterItems]],1,FALSE)),"","Y")
Now your original table will have a field you can filter on "Y" to get items in your list.
And because you made it a table, not a range, if you add items, the vlookup will dynamically scale to include those new items, without you having to do the cursed A:A range.
Home Tab > Highlight Column of values > Sort & Filter button > Filter > and from the excel sheet you can filter it by number from the top of the column of values.

Populate Excel table based on conditional options from another

As seen below, I have an excel file where collections from debtors is recorded.
Column A is the staff code who made the collection..
Column B is the date of collection
Rest is self explanatory
Out of this table, on a different sheet, I need to extract data from this table and populate a new table with the filtered data. E.g., On the second sheet, I need a table to show collections from only P102, of which I have managed to do with the below array formula:
{=INDEX(Sheet2!$A:$A,SMALL(IF(Sheet2!$A:$A="P102",ROW(INDIRECT("1:"&COUNTA(Sheet2!A:A)))),ROWS(Sheet2!$A$2:$A2)))}
Of course this code outputs only the Personnel code but I've ammended this to show for other columns too..
The thing I can't manage to do is, I also need to apply a second filter with the date.. Eg. Only those records from P101 and only in February..
I would really appreciate any feedback on this...
P.S. I do not wish to use Macros and No, I can't make a pivot table...
Regards,
Kemal
Personally I'd approach it using an array formula with logical conditional multipliers. Very similar to SUMIFS.
Here's the output I understand you require:
Here'e the array function (shift + ctrl + enter) I've used placed in cells G2:G5:
={SUM(IF(Table1[Personel]=E2,1,0)*IF("2014"&VLOOKUP(F2,{"Jan",1;"Feb",2;"Mar",3;"Apr",4;"May",5;"Jun",6;"Jul",7;"Aug",8;"Sep",9;"Oct",10;"Nov",11;"Dec",12},2,0)=TEXT(Table1[Date],"yyyym"),1,0)*Table1[Cash])}
Please indicate if there is anything further outstanding.
Kind regards,
James

Need help in manipulation of Excel 2007 table

Here are some statistics about my question(related to excel 2007)....
some thousands lines of data from web (so highly unstructured)....
Each row acting as a tuple ..(each row has data related to a particular entity with various attributes)
there are about 60-100 attributes for each row... i.e. some row has 60 attributes(followed by corresponding attribute value in next cell of same row) while some has 100 attributes(values)
These attributes are not structured and not in any particular pattern..(i.e. in some row Attribute "Music" is at column "A" and its associated value is at column "B" but in other row ,Attribute "Music" is at column "AB" and its value is at "AC"....
So here is my question
Is there any tool/excel utility which can group all attributes of same name under a particular column and its associated value in the next column .[IMP: the row order must not be changed as these attributes are associated row wise with some primary key]
This is a very broad question but I can give some suggestions. I don't know of any tool/utility to do what you need. However here are three options that you could use to get the result you want.
Figure out how to import into a database based on attribute name/value. Not sure this is possible without structuring the data first (organize each attribute into its own column).
Use formulas HLOOKUP/VLOOKUP/INDEX/MATCH to organize each attribute into its own column. No VBA with this option but uses very complex formulas.
Use VBA to loop through the rows and organize each attribute into its own column. This might be the easiest to implement logically but that depends on your skills.
Usually we want to see what you've tried before we help. You can explore each of these ideas on your own then post additional questions for specific problems you encounter. Show us your own effort as much as you can. We like to help correct specific code problems rather than simply create your program for you.
EDIT
Here are the formulas for method 2: The data is in Sheet1 and the formulas are in Sheet2.
Here is the formula in Sheet2!A2; copy down as far as needed.
=Sheet1!A2
Here is the formula in Sheet2!B2; copy down and across as far as needed.
=IF(ISERROR(MATCH(B$1,Sheet1!$A2:$K2,0)),"",INDEX(Sheet1!$A2:$K2,1,MATCH(B$1,Sheet1!$A2:$K2,0)+1))
Best wishes.

Resources