How to conditionally require 18+ fields based on selection of two dropdowns - validation

I'm new to Sharepoint 2010 with what I would call a highschool freshman level of coding experience, though I can generally stumble and tinker my way through. I don't currently have access to Sharepoint designer, but from the searching I've done so far, it may required. Still I'm hoping to find an OOTB solution to the problem below.
I have been tasked with building a incident resolution tracking sheet on Sharepoint. My boss is very concerned with being audited by legal, and has some very specific requirements about required information. Column A contains a drop down list of 5 choices that indicate the Final Solution. Column B Contains a drop down list with 4 choices that indicate the Initial Problem. Based on The selections in A and B, different Columns in C-X are required to be blank, not blank, or contain specific entries. The only way I can find to do this is to create a list validation containing a nested if for each combination of A and B resulting in 20 nested ifs. However sharepoint is limited to 7 nested ifs, so I'm looking for any possible solutions.
*This List will primarily be accessed in Datasheet view, so "HTML in calculated column" type solutions are not viable.

You can use calculated columns to break up the validation formula into more manageable chunks.
Let's start with a simple example.
Condition 1: If the initial problem was that the user's computer was too slow and the final solution was restarting the computer, you need to fill in the [C] column.
Condition 2: If the initial problem was that the user was on fire and the final solution was dousing them with water, you need to fill in the [D] column.
You could perform that list validation all in one formula, as below:
=IF(
AND([A]="Restarted Computer",[B]="Computer is slow"),
NOT(ISBLANK([C])),
IF(
AND([A]="Doused with water",[B]="User is on fire"),
NOT(ISBLANK([D]),
TRUE
)
)
But that's long and ugly (especially when you condense it to one line).
Instead, you could add two calculated columns, one for each condition you want to check. For the sake of this example, let's say you add a column called C_is_valid and a column called D_is_valid:
C_is_valid calculated column formula:
=IF(AND([A]="Restarted Computer",[B]="Computer is slow"),NOT(ISBLANK([C])),TRUE)
D_is_valid calculated column formula:
IF(AND([A]="Doused with water",[B]="User is on fire"),NOT(ISBLANK([D]),TRUE)
Updated validation formula:
=AND([C_is_valid],[D_is_valid])
It's easy to see how this can simplify even a very complex set of validation conditions...
=AND(C_is_valid,AND(D_is_valid,AND(E_is_valid,AND(F_is_valid,AND(G_is_valid,AND(H_is_valid,I_is_valid)))))
But even that could be simplified by consolidating some of those AND()s into multiple calculated columns, so that your final validation formula could be as simple as:
=AND([First set of conditions is valid],[Second set of conditions is valid])

Related

(Google Sheets) How to remove certain dropdown options after a certain number of cells with said option is met?

I'm currently working on a google sheets file to organize the members of my class. I am currently assigning committees and I want them to choose their committee in Google Sheets. However, I want to apply only a certain limit per committee.
What I want to happen is, if a certain choice has been chosen i.e. 5 times, I would like that choice to disappear from the choices and would make it reappear again if ever a students change their choice, however, I do not know how to do this in terms of a formula or through data validation.
I would really appreciate your help. Thank you!
Here's a toy example you may be able to adapt to your needs:
Create a list of options a,b,c,d,e in A1:E1 of Sheet1
Create a list of the limits for each option in A2:E2 (for instance 2,1,3,5,3)
Create a list of people Person1,Person2,Person3 in G2:G4
Apply data validation to H2:H4:
Use criteria 'drop down (from a range)'
Set the data range to =Sheet1!$A3:$E3 (only lock columns, not rows)
In A3 enter the following formula:
=lambda(people,choices,list,limits,
makearray(counta(people),counta(list),lambda(r,c,
if(index(choices,r)<>index(list,,c),if(countif(choices,index(list,,c))<index(limits,,c),index(list,,c),),index(list,,c)))))(
$G$2:$G$4,$H$2:$H$4,$A$1:$E$1,$A$2:$E$2)
We are using MAKEARRAY to create a 2D array with the list of options on each line, however we are asking it to omit elements of the list from each line if they haven't already been selected AND a preset limit on the number of selections for that option has not been reached. Obviously in a 'real' example you would place the data range for validation in a separate sheet and probably hide and protect that sheet as well. You could also potentially use an array literal of strings rather than a cell range as the list of options in order to make the validation list formula completely self-contained.

Power BI. Sort a column with repeated values based on another column

For my requirement, I've got a specific layout for a report. To simplify, the series of Categories should present the Areas in a particular order (financial information).
Every Category will be present on a different Page on Power BI. However, as you can see, some areas belong to multiple Categories. Because of this, I'm getting an error message if I try to order this column by an index, and I can't modify the name of the area.
Is it possible to specify on a cross table that I do not need it to perform any alphabetic order?
I've looked for a possible answer, but so far I have not found any solution to this.
Regards.

Excel 2017 Formula - Average data by month, while being filterable

I'm not a VBA coder, and I would prefer an excel formula if possible, the easiest solution will be the best one.
Test workbook screenshot
As you can see, I have plenty of columns, which are filterable.
I am attempting to retrieve an average of Column L, but I want the data to be calculated for the correct month in G3:R3.
The resulting calculation needs to be recalculated when filtered, between customers, sites, status, job type etc.
I am referencing the resulting cells in another sheet, which gives an idea of trends I can glance at, as such filtering by month in each sheet, is not an option.
=AVERAGE(IF(MONTH(E9:E1833)=1,(J9:J1833)))
This one does not update with the filtered data.
=SUM(IF(MONTH(E9:E1833)=1,J9:J1833,0)) /SUM(IF(MONTH(E9:E1833)=1,1))
This one does not update with the filtered data.
I have tried 5 different SUBTOTAL formulas, some with OFFSET, none of these produce the same result I get when checking manually.
Each worksheet has over 1,500 hundred rows, the largest is 29148 rows. The data goes back as far as 2005.
Please can someone help me find a solution?
One possible solution is to create a helper column which returns 1 if the row is visible and returns 0 if the row is invisible (or blank). This allows a bit more freedom in your formulas.
For example, if you want to create a helper column in column X, type this into cell X9 and drag down:
= SUBTOTAL(103,A9)
Now you can create a custom average formula, for example:
= SUMPRODUCT((MONTH(E9:E1833)=1)*(X9:X1833)*(J9:J1833))/
SUMPRODUCT((MONTH(E9:E1833)=1)*(X9:X1833))
Not exactly pretty but it gets the job done. (Note this is an array formula, so you must press Ctrl+Shift+Enter on your keyboard instead of just Enter after typing this formula.)
With even more helper columns you could avoid SUMPRODUCT altogether and just accomplish this by doing a single AVERAGEIFS.
For example if you type into cell Y9 and drag down:
= MONTH(E9)
Then your formula could be:
= AVERAGEIFS(J9:J1833,X9:X1833,1,Y9:Y1833,1)
There isn't a clean way to do this without at least one helper function (if you want to avoid VBA).

OBIEE remove dimension value based on measure result

One of my dimension contains the different divisions of the company. I have one division which doesn't exist anymore but I want to keep this to check the results of previous years and months.
How do I dynamically eliminate this value of the dimension when it doesn't have a measure anymore?
First I was thinking that adding a filter where the measure should be > 0 or 'not null' but this doesn't seem to do the trick. The dimension keeps showing up.
Thanks!
To go a bit into more details on Robin's question which is the most pertinent one:
Do you try to remove the "obsolete" dimension member from dimension-only queries - like prompts for example?
This is crucial to know as forcing a normally dimension-only query over a fact and thus continuously forcing the inclusion of the fact table for all queries potentially has quite a performance impact.
a) ">0" and "is not null are two completely different things and if used in a cavalier fashion can also yield absolutely wrong results. What if the measure is at a negative value? That would make it "disappear" as well for you. What if there simply is no measure yet but the dimension member is implicitly actually valid just not filled yet? That would also make it disappear for you.
b) How can you know the point of view a user is standing at? For an analysis run for last year this will be perfectly valid to show?
c) What about time-variant comparisons? What about rolling calculations?
d) What about the point-in-time of the dimension rather than the fact? --v
e) What about cross-org analysis like "What do our numbers look like when we apply last year's org vs this year's vs a planned new one which is already loaded into the data source?
While I understand the idea behind your question you should not forget that we're talking analytics here and always face changing dimensions and attributes so your request which seems valid from a human point of view for that one, specific use case is - for the solution as a whole - to be considered wisely.
Although I'm not clear on what you mean by "eliminate this value of the dimension", I think you may be looking for the pivot measure function, called FILTER(Fact USING (Insert your filter here)).
I am assuming that when aggregating using a measure, your problem is that you are unable to exclude the Division that does not exist anymore, and as a result, your measures/aggregations are incorrect.
In this case, you should use the pivot measure as I indicate above.
Your column formula would look like this:
FILTER(Measure1 USING ("SubjectArea1"."Division" <> 'DivisionName'))
Follow these steps to implement this function:
Edit the column formula of your measure.
Highlight the formula of the column and click the Filter... button at the bottom of the Column Formula text box. An Insert Filter window will appear.
Select the Division column from the Subject Areas pane. (Either double-click it, or select it then click the OK button).
You will see a New Filter window. Change the Operator to is not equal to / is not in.
Select your Division that you want to exclude.
Click OK to close the New Filter window.
Click OK again to close the Insert Filter window.
Click OK again to close the Edit Column Formula window.
If your syntax is correct, you will see no errors.

Can't seem to get runningvalues to work in VS2013 Report Designer

I have a margins report that I've created that groups by Month, Customer, Sales Type then displays the sales details. I have that basic report working well. The SALTYPE group has four options from the stored procedure that pulls the data, they are A, B, C, D. I've been asked to add grand totals at the bottom of the report for each sales type.
From my research it appears I need to use RunningValues in an expression to generate these totals but I've been unable to find any useful examples. I've tested for the Tot. Sales column using the expression =RunningValue(Fields!TOTSALES.value, sum, "SALTYPE") but it throws an error I'm not sure I'm interpreting correctly, "The Value expression for the text box 'Textbox168' has a scope parameter that is not valid for the aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset". If I understand correctly it's referring to "Tablix1_SALTYPEGroup" but I'm unclear what that should be or if I'm completely off base.
Can anyone provide an example to get those grand totals or point out the flaw in my expression? I've been all through MSDN but primarily been referencing this blog.
So I may be incorrect but it appears they way I had my groups structured and the details sorted it wasn't possible to generate the totals I needed. I resolved this by simply adding a summary Tablix below my first one, using the same data but structured and sorted in a way to easily generate my totals. By sorting the details on the SALTYPE I could then just add a total and hide the details. The result is exactly what I was looking for.

Resources