Pass multiple account variables to single parameter - visual-studio-2012

I am building a financial report. Months as columns, department/account as rows, summing transactions:
I am able to expand departments and see totals by account, I am also able to click on a single account amount and drill through to another report for transactional detail. Say account 70300 for March totaling 14,244. This work wells. The report successfully passes Department 000, account 70300, 201503 for March 2015, showing me the transactional detail for the account.
My issue is being able to drill through for a department, say the 1,063,038 for department 000 for March. I am able to click on the value and pass it actually passes all the accounts with data for the month to the filter Acct, however it returns no data:
I thought it would have something to do with how the separator is stringing the accounts together in my expression. I have tried “,” and “, “. Looking at other reports I have created with multiple criteria selection from a drop down list it always displays selections separated with a comma then a space but that is not working for me. Here is the expression I am using via Text Box Properites -> Action -> Expression:
=IIF(Inscope("matrix1_G_L_Account_No_"),Fields!G_L_Account_No_.Value,Join(LookupSet(Fields!Global_Dimension_2_Code.Value, Fields!Global_Dimension_2_Code.Value, Fields!G_L_Account_No_.Value, "DataSet1"),","))
Any advice is greatly appreciated!

Related

I want an excel formula to do vlookup multiple times based on the Vlookup results it got for each Vlookup

I have got a ton of bid-related information from the Government E-procurement site in India. I have columns like Ministry, Organization, Department, and Office which are in a hierarchical fashion like multiple offices inside Department with multiple departments inside an organization and organizations inside a ministry. I have a separate list of accounts that have salespeople aligned to it. Now my problem is to find a formula that will help me align the opportunities to each salesperson. I want the formula to go like this, first, it filters out all the results based on Ministry, then out of those filtered results, it filters out the Organization/Department/Office and returns the value from the list of accounts that have salespeople aligned to it. I also want it to skip if Organization is not present and move on to Department.
Sample of data
I tried using VLOOKUP after text-joining Ministry, Organization, Department, and Office, but it matches only the first word and hence the matches are not accurate.
I had a formula passed down to me but couldn't make any sense of it.
=IFERROR(VLOOKUP([#[Organization Name]],ISR_alignment!$G$2:$H$22,2,FALSE),
IFERROR(INDEX(ISR_alignment!$A$2:$A$72922,MAX(IF(ISERROR(FIND(LOWER(
ISR_alignment!$A$2:$A$72922),LOWER([#MDOOA]))),-1,1)*(ROW(
ISR_alignment!$A$2:$A$72922))-ROW(ISR_alignment!$A$2)+1)),""))

Append a column of a few tables into a single bigger column

I'm having a problem while building this sheet and i'm not being able to find a solution.
The problem goes like this:
This is a marketing agency that wants to build quotes for their clients in a more automated and simpler way they do today.
There is a master table that the user must put all products they have to offer and their prices
from this master table, I've created 5 other tables with power query, So they have an user interface to fill the number of products and price adjustments they want to quote. Also some products price depends on the price and quantity of other products. that's why I needed to separate it.
Now I need to bring them back together so I can use it as a source for a pivot table to build their report.
I've tried a few things:
Making them all a joined source for pivot table, but as they don't have any exclusive fields it failed.
They have a different number of columns and rows, so putting them below each other won't work
I've also tried =Table[Total Value]:Table2[Total Value], but they are joined side by side, and I need them one below each other.
I haven't tried VBA, but it's not out of the question.

Inventory management - find employees with two OR more particular devices

I am managing the inventory of stock for an IT company.
Recently we've had to dole out lots of new iPhones as the old iPhones assigned to employees were incompatible with a particular piece of software.
With most employees working from home and IT staff being split into several different offices it can be a little difficult to co-ordinate things and make sure that the staff member who received a replacement iPhone actually sent back the original one!
It would be great to have an easy means of check for staff who have two (or possibly more) iPhones (any type) so that I can contact them and ask them to return the old device.
I can export the data from the SQL-based equipment database to Excel and analyse it but I don't have the experience to make things more automatic (and build a report).
Here is an example of the database (shown as an Excel file).
In this example case, John Murphy, has got two iPhones. He only needs one of them. Items with the "Employee_Name" set to "IT Service" and have the status set to 'With helpdesk' are in order and do not need to be included in the final report.
'Tammy Top' has only one iPhone and therefore mustn't appear in the report.
Thanks for your help!
UPDATE...
I've played around with Pivot Tables a little... it may be a start. Perhaps if someone is more experienced they could suggest a better way of setting up the values for the pivot table?
I am pretty sure, that there are better solutions.
But at the moment, I can offer you the following:
E2: =IF(AND(A2="IT Service", D2="With helpdesk"),0,COUNTIFS($A$2:$A2,A2,$D$2:$D2,D2))
G2: =FILTER(A2:D6,(E2:E6>1),"")
In column E I used a COUNTIFS formula to check how often an Employee_Name has occured until now. I wrapped it in an IF statement, that checks whether the combination of "IT Service" and "With helpdesk" occured. In that case, it would override the counter with 0.
In column G I used a FILTER formula to provide the relevant rows (A to D) of the source area in case the counter is higher than 1.
Seeing as the data is in SQL Server, just query the database instead of mucking around in Excel.
Something like:
SELECT Employee_Name FROM <table> GROUP BY Employee_Name WHERE COUNT(*) > 1 AND Employee_Name <> 'IT Service'
Should get a list of Employees with more than one phone. To get the full list something like:
SELECT * FROM <table> WHERE Employee_Name IN (
SELECT Employee_Name FROM <table> GROUP BY Employee_Name WHERE COUNT(*) > 1 AND Employee_Name <> 'IT Service')
should get you the list you want.
being the name of the table/view/SP that is generating the data you are importing into Excel.

Auto-Fill range of cells in excel from a list of names based on criteria

I have a table with a list of tasks that happen on three shifts, and a list of employees that will be assigned to these tasks.
each employee can't be assigned to the same task twice in the same day and can't have two tasks in the same shift.
Employees Table
Schedule Table
currently, I'm using this function
=INDEX(Employees!$A$2:$A$31,RANK(Employees!B2,Employees!$B$2:$B$31)+COUNTIF(Employees!$B$2:Employees!B2,employees!B2)-1)
I use this function in each column separately and change the "-1" in each column to make sure that no employee gets the same task twice.
The problem is as you can see that sometimes it results in #ref error and sometimes the Rand() function results in the same value as in shift 2 Noah is presented twice also I couldn't check if the employee is working that day or not unless I extract the working employees for each day separately which I want to avoid.
Also, I would like to know if there's a way to make sure that each employee get assigned the same amount of tasks that day or that no employee doesn't get assigned a task.
I can't use VBA as I have to use office 365 on the web which uses typescript only in the enterprise edition.

SSRS Cells auto-merge

I'm having trouble unmerging cells on the report.
3 Suppliers for the query
I have a SQL query that shows 3 instances of a supplier (left joined to contact) as shown below. However, when running the report for the query the 3 instance of the supplier is merged into one. This is not desirable in my case because when exporting the report to excel, I'd like to be able to sort columns based on other properties, however, this would not be possible due the the merging of the rows. How can I get results to show individually?
Cells are Merged on the report
Within the properties of each Row Group you can specify which columns to group on. You generally don't need a separate group for each field, but that's OK. In your last group, the one called "(Details)", if it is not grouped by anything, it will show one row per line of results from the query. So take a look at what it's grouped by. As long as the rows are in your dataset, the report will group or show them based on how you configure the grouping here. Grouping on nothing means it will show all rows.
Another tip is to align the end of your header textbox with the line of one of your columns. This will prevent it from creating an extra column in Excel for the "City" field.
Your report does not need all of those groupings - the SSRS grouping is not like SQL. You should only group when you want to aggregate data on that field. Normally you might have a company with its address in various fields in one group but you only need to group once on the Company Name or (preferably) ID - not on each field and not a separate group for each. You could then show details of various invoices in other columns that aren't grouped.
But since you want to display the company data on each row, you would not want ANY grouping on the company.
To fix your issues, remove all the groupings (but not the rows) and just leave the detail group (which doesn't have a Grouping).
You can check out MS Docs: Understanding Groups for a better explanation.

Resources