salesforce
2 TopicsAverage Time by Opportunity Stage
Hi Community, I have an opportunity history table, similar to the below, and I am trying to calculate the average length of time opportunities spend in each stage. I want to plot the average time, in days, on a time series with the categorical stages as my x-axis. I've created a separate table of the each opportunity stage and a corresponding order, so the stages plot in sequence on x-axis and will connect that reference table to my Opportunity['StageName'] table to accomplish this. OpportunityId StageName Date AA Identification 1/1/23 AA Qualification 2/1/23 AA Cultivation 3/1/23 AA Verbal Commitment 5/1/23 BB Identification 2/1/23 BB Qualification 3/1/23 BB Verbal Commitment 7/1/23 I don't necessarily care about time in each stage on an individual opportunityId level, rather, I want to show that, on average, opportunities spend 30 days in Identification and so on from there. Opportunities can skip stages, though. Any help in creating a DAX measure in support of this would be greatly appreciated. Thank you!Solved1.1KViews0likes1CommentNeed something similar to COUNTIF() across 2 unrelated tables in PowerBI
Hello, Relatively new BI user here, I am struggling to make a small table in Power BI which will allow me to count the number of times each value in 1 table appears in another table. My data appears as follows: I have Referral table, which I created in the query editor. I created it using an mquery and converted it from a list into a table. This just contains a list of all referral options that can appear on records (records can contain 1 or more referrals). The empty column here is where I would like to get a count for the number of times each of these options appears in the main table. Secondly I have my main table with all the records extracted from the database(salesforce). Originally the Referral__c .1/2 columns were 1 column which had to be split as it was from a multi select picklist, and so values would appear in 1 line separated by a semicolon. The table above has a basic filter which just removes any records that don't have referrals. I am thinking this should be something relatively easy to do but I cannot seem to find a solution, I have tried to use Calculate and count functions and I have tried to create a relationship between the 2 tables so that I could use related function (this was not possible as the option is just greyed out). I cannot seem to get some DAX to show how many times each of these options appears in the main table, or in 2 of the columns in the main table (Referral__c.1 and Referral__c.2) A measure would also be fine for this I think? I just need to be able to match the options in from my Referrals table to the number of times it is occuring in main table. Any help would be greatly appreciated. Thanks, ElSolved2.8KViews0likes3Comments