SalesForce Report Row Formula - salesforce

How can I dow a row formula that check if one date does not equal another date?
I am looking for a way to add this I tried the following:
IF(Position__c.Integration_Date__c <> Position__c.Verification_Date__c,1,0)

Related

number of months between two dates in salesforce

I have a report in Salesforce that contains an Estimated Start Date and Estimated End Date - see below example:
What I want to do is create a formula column that will allow me to show how many months are between those dates.
I can do this easily in excel using DATEDIF but cannot replicate that in the salesforce report itself - see below example of desired result using DATEDIF in excel:
Can anyone advise on the easiest way to achieve this result as a formula column in Salesforce?
Many thanks
I did this by creating a field with the below formula
((CloseDate - Estimated_Start_Date__c) /(365/12))

How to get the source of an ARRAY formula combined with QUERY in Google Sheets

I have a Spreadsheet where each tab is a month (January, February, ..., December) and they have exactly the same structure.
In order to combine all the information in a single sheet I used an array:
={January!A5:Q;February!A5:Q;March!A5:Q;April!A5:Q;May!A5:Q;June!A5:Q;July!A5:Q;August!A5:Q;September!A5:Q;October!A5:Q;November!A5:Q;December!A5:Q}
But I wanted to filter the entries of each month based on some conditions, so I used the QUERY function:
=QUERY({January!A5:Q;February!A5:Q;March!A5:Q;April!A5:Q;May!A5:Q;June!A5:Q;July!A5:Q;August!A5:Q;September!A5:Q;October!A5:Q;November!A5:Q;December!A5:Q},"select * where Col3 = 'X'",0)
I get the desired result. The extra plus that I want to achieve is to identify the month at each line belongs, in other words, the sheet were the data is pulled. And I want to see that without adding columns or extra fields on the source sheets.
How do I do that?
try:
=ARRAYFORMULA(QUERY({
January!A5:Q, January!Z5:Z&"January";
February!A5:Q, February!Z5:Z&"February";
March!A5:Q, March!Z5:Z&"March";
April!A5:Q, April!Z5:Z&"April";
May!A5:Q, May!Z5:Z&"May";
June!A5:Q, June!Z5:Z&"June";
July!A5:Q, July!Z5:Z&"July";
August!A5:Q, August!Z5:Z&"August";
September!A5:Q, September!Z5:Z&"September";
October!A5:Q, October!Z5:Z&"October";
November!A5:Q, November!Z5:Z&"November";
December!A5:Q, December!Z5:Z&"December"}
"where Col3 = 'X'", 0))
where column Z is an empty column

Create a column within an SSRS Report to sum values based on conditions of previous column

I have an ssrs report that shows revenues for each month of a year for several years based on start and end date parameters the user enters. What I would like to do is add a second column that shows the revenue for that quarter (march would show q1 revenue, june q2 etc). the problem I am having is that I am able to do this for a single year but once the query starts looking at multiple years my column shows the value for all 1st quarters regardless of year. The picture shows what I am currently getting. Any recommendations on how to fix my expression to also look at the year value when summing these quarters?
Here is the code I am using to only populate the quarter column based on the month.
=IIF(Fields!Sort_Order.Value=3,
Sum(Lookup(1,Fields!Sort_Order.Value,Fields!Calculated_Revenue.Value,"Bookings"))
+Sum(Lookup(2,Fields!Sort_Order.Value,Fields!Calculated_Revenue.Value,"Bookings"))
+Sum(Lookup(3,Fields!Sort_Order.Value,Fields!Calculated_Revenue.Value,"Bookings")),
IIF(Fields!Sort_Order.Value=6,
Sum(Lookup(4,Fields!Sort_Order.Value,Fields!Calculated_Revenue.Value,"Bookings"))
+Sum(Lookup(5,Fields!Sort_Order.Value,Fields!Calculated_Revenue.Value,"Bookings"))
+Sum(Lookup(6,Fields!Sort_Order.Value,Fields!Calculated_Revenue.Value,"Bookings")),
IIF(Fields!Sort_Order.Value=9,
Sum(Lookup(7,Fields!Sort_Order.Value,Fields!Calculated_Revenue.Value,"Bookings"))
+Sum(Lookup(8,Fields!Sort_Order.Value,Fields!Calculated_Revenue.Value,"Bookings"))
+Sum(Lookup(9,Fields!Sort_Order.Value,Fields!Calculated_Revenue.Value,"Bookings")),
IIF(Fields!Sort_Order.Value=12,
Sum(Lookup(10,Fields!Sort_Order.Value,Fields!Calculated_Revenue.Value,"Bookings"))
+Sum(Lookup(11,Fields!Sort_Order.Value,Fields!Calculated_Revenue.Value,"Bookings"))
+Sum(Lookup(12,Fields!Sort_Order.Value,Fields!Calculated_Revenue.Value,"Bookings")),""))))
I ended up creating a quarter column within my data set that was then used as a parent group for the month rows. I then hid that column and added a total for the quarter that gave me sub totals. Not exactly what I was looking for but gave me the result I needed.

Excel average based on row and column values

I would like to calculate the average (and other summary statistics) of algae counts based on the algal group (Column B) and the month (collection dates are in row 1). The first few columns and rows look like this:
row B---------------------C-------------------D
Algal Group -------6/5/2000 ----------7/5/2000-----etc.
Cyanobacteria-------5---------------------60
Bacillariophyta-------2---------------------40
Xanthophyta-------[blank]---------------30
I've tried using the standard AVERAGEIFS combined with the MONTH forumla, but I think the row of dates is throwing it off. I've also tried inserting a new row below the dates (i.e., row 2) with the Month of the collection date in row 1, and referring to that column in an AVERAGEIFS. That didn't work either. I've also tried entering it as an array formula. The dates are C1:DW1, Algae Groups are B2:B246. Any thoughts are much appreciated!
Use an array formula like this:
=AVERAGE(IF((MONTH($C$1:$E$1)=H8)*($B$2:$B$4=H9)*($C$2:$E$4<>""),$C$2:$E$4))
Being an Array it needs to be confirmed with Ctrl-Shift-Enter. If done correctly Excel will put {} around the formula.

DAX Date Range Syntax - Count one Row More Than Once?

I'm working with a SQL 2014 tabular model and I want to create a measure for count based on a date range.
My fact table will have a start and ending date range which can span multiple months. I want the user to be able to select a date range to get a count of records. The catch is that each month a record spans needs to be captured as separate in the count.
For example: Record 1 - 1/1/2014 - 8/21/2014. If the user selects a date range of 3/1 to 5/1, I want the count to return as 3 (March, April and May). If the user selects 6/4/ - 6/4, I want the count to return as 1.
Is there a way I can do this with DAX or should I go the route of creating a record for each month?
Your model is not exactly clear; but assuming that your StartDate and EndDate are in the same row - you are in effect, looking to count the number of month between these 2 dates and that can be achieved as follows;
=(YEAR([EndDate])-YEAR([StartDate]))*12+MONTH([EndDate])-MONTH([StartDate])
Your measure would then SUM() the results of this calculated column.

Resources