I want to get number of people absent for a day from a dump file that has data as follows:
Name |no of hrs |production |date
ABC | 6 | 55 |11/26/17
PQR | Absent | Absent |11/26/17
MNO |5 |50 |11/26/17
XYZ |Absent |Absent |11/26/17
In this format rest of the data for rest of the days.
I want to show a recurring graph with percent of people absent for a week. I am unable to get number of people absent on that particular day. I tried using 'countif' but it gives me total people absent from the whole dump file. How can I get it day wise (by using functions)
Related
I am often building pivot table reports for users for products or customers. Users often request that additional information be displayed within the pivot table for those row items. For example, in a pivot table showing item sales by year, they want me to include a column that shows what TYPE of item it is or who the author is. These attributes are additional properties of the item, and they are 1:1 for each item. I don't want them to be grouped. How can I do this?
For example This is a pivot of books by year. How do I add the author attribute without grouping it?
Title | Author | 2019 | 2020 | 2021 | Totals
Awesome Book | J. T. Joel | 100 | 120 | 90 | 320
Crappy Book | Karl Klapp | 50 | 40 | 10 | 100
I'm used to doing this pretty easily in SQL, so I'm confused as to why it is hard in this context? Probably I have some fundamental misunderstanding about how pivots work, but maybe I'm just missing something obvious?
Thanks.
When using the summary function "Group" in Saved Searches (SS), is it possible to show the total count inline or even use it inline? For example, I have a SS that counts the number of cases closed in a certain date range and it groups by the assigned employee and the total is listed at the bottom, as per usual. However, when trying to calculate the percent of the total each employee closed, they all show as 100%.
Here is a picture of the results and I have also added the formulas I am currently using. Here is what it looks like when I'm editing the search. The right most columns were my attempt at getting the total inline.
I'm fairly certain this is because I am grouping by the employees (or else there would be almost 3k lines in the report), but I don't think there is a better way to solve that problem other than by grouping by the employee.
We have tried doing an actual report in NetSuite (as opposed to saved search), however, the report times out quickly and we are hoping for a quicker solution. We also considered a KPI scorecard, but the issue would be that we would need to make a SS for each employee which isn't a good long-term solution due to team changes.
Is there a way of calculating the percent of the total when using grouping? Sorry for the long post, I was trying to be as descriptive as possible. The goal is to see how much (percent wise) each employee contributed to the total cases closed.
Take your SUM column that counts the closed cases.
duplicate it but add the function % of total
So
| Field | Summary Type | Function | Formula |
| ----- | ------------ | -------- | ---------------------------------------------------- |
|Formula Numeric | Sum | | Case When {status} like 'Closed%' then 1 else 0 End |
|Formula Numeric | Sum | % of Total | Case When {status} like 'Closed%' then 1 else 0 End |
Lets say I have a table in sheet 2:
my headers go
Program | start year | Salary | meets some expectations | meets all expectations
business | 2017 | $50,000 | $0 | $1,000
finance | 2016 | $60,000 | $0 | $2,000
treasury | 2015 | $80,000 | $0 | $5,000
In another sheet (sheet1), I have a roster where I need to pulls in salary data based on that table. So, if employee 1 in row 1 has a start year of 2015, it'll pull over her planned salary of $80,000. Employee 2 in row two started in 2017, so their planned salary will be $50,000.
how can I use an index/match to pull over the correct planned salary? I feel like this is a long-winded IF statement to trigger an index/match value, but I don't know where to start.
Second part to this, how can I implement an IF statement to pull over the incentive numbers?
example:
employee 1 business 2015 meets all expectations would receive a $5,000 incentive.
This table I made has only one business segment, there are dozens, so I'm sure that would factor in. Can this be done?
With the data you gave in your example, this formula can work (enter with CTRL+SHIFT+ENTER):
=INDEX($A$2:$E$4,MATCH(B7&C7,$A$2:$A$4&$B$2:$B$4,0),MATCH(D7,$A$1:$E$1,0))
I don't think you need multiple criteria to simply pull through the salary.
Can you not just do this:
=INDEX($K$5:$K$7,MATCH($D4,$J$5:$J$7,0))
To get the incentive value based on start year AND performance, you can use an INDEX/MATCH/MATCH:
=INDEX($L$5:$M$7,MATCH($D4,$J$5:$J$7,0),MATCH($F4,$L$4:$M$4,0))
EDIT: To allow for different programs without an array formula:
=INDEX($L$5:$M$7,MATCH(1,INDEX(($C4=$I$5:$I$7)*($D4=$J$5:$J$7),0,1),0),MATCH($F4,$L$4:$M$4,0))
The trick here is in first MATCH formula, which checks both the Program and Start Year:
MATCH(1,INDEX(($C4=$I$5:$I$7)*($D4=$J$5:$J$7),0,1),0)
Background
I am building a simple dashboard in the Power BI plugins for Excel (Power Query, Power Pivot & Power View) to get some experience with Power BI. The dashboard is for presenting simple time reports made by a consultant (i.e. myself). The format i want to use for inputting data is in a Excel table as follows:
InputData:
Date | Timecode | Duration[hrs] | Tags
-----------|-----------|---------------|----------------------
2016-02-01 | CustomerA | 1.2 | Support;ProductA
2016-02-01 | CustomerB | 0.3 | Support;ProductB
2016-02-02 | Internal | 4.2 | Development;ProductA
The Date field is simple. The date that the time report is for. The Timecode is the "name" of the hours reported. In common software this is usually a Project code or similar, but i want to keep it on a customer basis. The Duration is a float representing the number of hours spent for that Timecode that day. The Tags column is the interesting part: to simplify input is want it to be a (semicolon) delimited string, but that wont do when creating a data model for Power view.
What I am trying to make is a separate table with the all the tags, and a link table to connect the tags to the corresponding rows from the time report. In the Power view report, I want to be able to filter my time reports on the tags, such as analyzing the time spent on ProductA or Support.
Question
How do you take a non-normalized field such as Tags above and replace it with a dimension table and a link-table, using Power BI plugins for Excel? How do I end up with the following Three tables:
TimeReport:
Date | Timecode | Duration[hrs] | TimeReportID
-----------|-----------|---------------|----------------------
2016-02-01 | CustomerA | 1.2 | 1
2016-02-01 | CustomerB | 0.3 | 2
2016-02-02 | Internal | 4.2 | 3
LinkTable:
TimeReportID | TagID
-------------|--------
1 | 1
1 | 2
2 | 1
2 | 3
3 | 4
3 | 2
TagsTable:
TagID | TagName
-------|----------
1 | Support
2 | ProductA
3 | ProductB
4 | Development
Attempt
By picking out only the Tags-column and then splitting, pivoting and removing duplicates (inspired by this link i have managed to create the list of all tags as in:
Tags:
TagName
----------
Support
ProductA
ProductB
Development
But I cant manage to understand how to link the tables to eachother. Please aid me in this.
I think you have 2 options:
using Power Query, add Merge & Expand Column steps to join TimeReport to LinkTable and then TagsTable
using Power Pivot, load all 3 tables then go to the Diagram view and establish relationships between them. Use "Hide from Client Tools" to hide the columns that are meaningless to the User e.g. TagID
I prefer Power Query as the functionality is more flexible and it is much easier to debug.
I am fairly new to DAX / PowerPivot but have built a nifty Sales Dashboard which is working well. Once combined with the PowerUpdate utility and Office365 PowerBI we will have a awesome solution. I'm excited!
One final thing that I am struggling to get my head around, is how we handle changing targets/budgets when a Sales Rep is promoted, as we assign budget by Job Level.
Let's say we have Sales Rep A - Junior Sales Rep with a target/budget of 30K per Quarter and they they get promoted in Q2 to Mid-Level with a target/budget of 45K per Quarter.
In my current dashboard, as soon as the Job Title is changed, this changes historical budget to the new target which warps any historic performance.
We have too many Sales Reps to create a quarterly budget table rows entry for each Sales Rep and each Quarter which seems to be how all the examples out there handle it - i.e:
Sales Rep A | 2015 | Q1 | 30000
Sales Rep A | 2015 | Q2 | 45000
Sales Rep A | 2015 | Q3 | 45000
My initial thoughts were to add a new user to the User Table with the same name and a "Budget Valid To" date and calculating target based off those dates.
Sales Rep A | Junior Sales Rep | 30000 | 01/01/2015
Sales Rep A | Mid - Sales Rep | 45000 | 01/04/2015
I just can't get my head around how I would handle this in a DAX calculation and I can't help thinking that there must be a more elegant way of handling this anyway! I'm so close to delivering this it tingles.
Let me know if you need an example or more detail.
Cheers,
Ben
Not sure the granularity of your data (daily | weekly | monthly). But one idea that could work well is to divide the target by the granularity so you're effectively pro rating the target. Then you can use basic SUM functions at each quarter boundary to show accurate targets since the sum of the 'daily' targets would equal your hard coded targets. You'd need to be careful if your periods vary in number of days... dividing into months would make it uniform; but mid month promotions would still be hard. HTH.