Calculate total number of open item at each month in Powerpivot - excel

I want to find a way to calculate the total amount of open items in each month in powerpivot. My data looks like this...
Id Team CreatedDate ClosedDate
01 AAA 1/30/2014 5/13/2014
02 BBB 2/9/2014 2/18/2014
03 CCC 5/10/2014 9/15/2014
Result should look like this...
Month Count
Jan2014 1
Feb2014 2
Mar2014 1
Apr2014 1
May2014 2
Jun2014 1
Jul2014 1
Aug2014 1
Sep2014 1
Is any way to do this?
TIA...

Related

pandas dataframe columns for each month of year

I have a CSV file with employee information. There are multiple records for an employee describing his monthly information. I want to create a consolidated dataframe where there are columns for each month and the number of leave days availed for each month is stored in the appropriate column
Emp. Code Month Year leave Days
1 2-2022 10
2 3-2022 15
1 3-2022 20
2 2-2022 2
1 4-2022 3
1 5-2022 2
2 6-2022 4
expected output
empcode leavedays-Feb leavedays-march leavedays-april
1 10 15 3
2 2 15 nil

Excel - Count based on criteria in 3 other columns

I'm looking for help in getting a count based on criteria in 3 other columns. I started to do a pivot table, but I cannot see how to add an IF statement to the distinct count there.
I need a count of each customer within the customer type, by each supplier, if the Cases > 0 for that year.
Here's a sample data set:
Supplier
Customer
Type
2019 Cases
2020 Cases
ABC
Al's Store
Package
3
2
ABC
Ben's
Package
0
6
ABC
Kroger
Grocery
2
1
ABC
Publix
Grocery
1
0
XYZ
Al's Store
Package
0
5
XYZ
Ben's
Package
4
0
XYZ
Kroger
Grocery
0
1
XYZ
Publix
Grocery
3
7
I need a result like this. My actual report will have each supplier on their own tab.
Supplier
Type
2019 Customer Count
2020 Customer Count
My Reason
ABC
Package
1
2
Al's bought in both years, but Ben's only in 2020
ABC
Grocery
2
1
Kroger bought in both years, but Publix only in 2019
XYZ
Package
1
1
Al only bought in 2020, Ben only bought in 2019
XYZ
Grocery
1
2
Kroger only bought in 2020
Thanks!

Using "SUMIF" array for particular values(date) only

I have a log from restaurant of about last 4 months.
I have to calculate the total number of sold Products on Particular Date.
Here is the Sample format :
Date| Time | Product Code | Name | Price Sold Unit
7/2/2018 13:00 0101 XXX 100 4
7/2/2018 15:00 0101 XXX 100 6
7/3/2018 12:00 0101 ZZZ 100 4
7/3/2018 19:00 0101 ZZZ 100 4
Now I can use SUMIF and find out the total XXX and ZZZ sold. Which will equivalent to XXX = 10 and ZZZ = 8 .
But I want to calculate (SUM IF ) total on particular date which is of 7/2 and 7/3 .
I can use filter tab and select date and calculate. But the problem is log is of 30-31 Days . So it will take some time and I have about 3 months data to calculate.
Is it possible to calculate without using Filter tab for particular Date ?
Original FileReport
Assuming your data span from col A to col F. Try this.. and adjust accordingly..
=SUMIFS(F:F,D:D,"XXX",A:A,DATE(2018,7,2))
Hope that helps..

Check Multiple Columns for the highest value

So say I had a table like this that has the score of 3 different teams for the week.
Day Team1 Team2 Team3
Mon 5 2 2
Tue 0 7 7
Wed 6 3 2
Thu 0 0 1
Fri 13 6 5
I want a formula that can find the highest score for the day and mark it on a identical table with a value of 1 and mark the other teams 0.
If there are 2 values that are the highest I want them to both be marked 1.
There will never be day with all 0's
Using the data from the table above my other table would look like this.
Day Team1 Team2 Team3
Mon 1 0 0
Tue 0 1 1
Wed 1 0 0
Thu 0 0 1
Fri 1 0 0
I have a working formula
=IF(AND(B2>=$C2,B2>=$D2,B2>=$E2),1,0)
I was just hoping there was a better way to write this formula, so that I can drag it across the teams and have it still work.
If I try to drag my formula now. I have to update the formula for each column. Sometimes I might have 20 + teams.
Any advice is appreciated.
Use MAX():
=IF(B2=MAX($B2:$D2),1,0)
Then copy/drag over and down.

Powerpivot DAX Rank products by quarterly sales with monthly data

I'm trying to create a calculated column that assigns a rank to each Product based on its sales in each combination of Country, Store, and Quarter.
However, the data in the table is monthly.
I was thinking of using SUMMARIZE() to create the quarterly view and then use RANKX() on that, but the value for the sum of sales cannot be evaluated for each column if I use summarize.
In order to get the rank for the monthly view I have been using the following formula:
=
RANKX (
FILTER (
Table,
Table[Country] = EARLIER ( Table[Country])
&& Table[StoreType] = EARLIER ( Table[StoreType])
),
[Sales]
)
Simplified the data looks like this with the calculated column for monthly rank and the quarterly one I'm trying to figure out
Country StoreType Month Product Sales MonthlyRank QuarterlyRank
USA A Jan-15 P1 10 1 2
USA A Jan-15 P2 15 2 1
USA B Jan-15 P1 5 1 2
USA A Feb-15 P1 5 3 2
USA A Feb-15 P2 20 1 1
USA A Feb-15 P3 10 2 3
USA A Mar-15 P1 10 2 2
USA A Mar-15 P2 25 1 1
USA B Mar-15 P3 15 1 1
How could I be able to achieve this?
You need to add a column to your date dimension that uniquely identifies each quarter. Why don't we call this unique column something like QuarterKey or QuarterIndex.
Then you can do the following in your SUMMARIZE():
ADDCOLUMNS(
SUMMARIZE(
FactSales
,DimGeography[Country]
,DimStore[Store]
,DimDate[QuarterKey]
)
,"SumSales"
,CALCULATE( SUM( FactSales[Net Amount] ) )
)

Resources