first value
4 TopicsCount first instance in date range
I am trying to count all those that have reached 24 months milestone in a given date range. My data has a row of data per person, per day with a column that indicates months service. So someone will have 24 months service for approximately 30 (give or take) rows. I would like to count just the first time the number 24 appears so I can show, for example, how many people reached this milestone in a given time period. Each period I have is roughly 28 days long so someones 30ish rows of data will likey span more than one period - I want to count them the first period their 24 appears. This is a large data set so a calculated column is to slow. I've gone DAX blind this afternoon so can't see wood for the trees. This is my current attempt (which I know is off) but highlights the route I'm trying to take - I think. #CurrentCustomerAchieving24Months = VAR First24 = CALCULATE( MIN('Data'[DateKey]), FILTER('Data', 'Data'[ServiceLength_Months] = 24 ) ) VAR Counter = CALCULATE( COUNTROWS('Data'), FILTER( 'Data', 'Data'[ServiceLength_Months] = 24 ) && 'Data'[DateKey] = First24 ) RETURN Counter Example Data in the attached. In the attached I would want to be able to count person 12345 in Period 1 and Person 67891 in Period 2 This should be a link to the very simplified example https://we.tl/t-Fse9l24Jn9Solved684Views0likes2CommentsReturn the value for the next minimum date if the value field is empty, and group by ID.
Hi, In dax, I would like to return the value for the next minimum date if the value field is empty, which should be group by ID. Also, need to return the coresponding value in the associated category colum. I have only one table and have attempted to use several measures, the example measure below does not work well when there are null values. Please help! CALCULATE ( MIN ( Query1[value]), FIRSTDATE ( Query1[date]) )1.8KViews0likes7CommentsFirst occurrence in a measure
Hi folks, I've been scratching my head over this issue and read through multiple forum posts but nothing has helped me so far. Sample data below: I have four fields here: Index - unsummarized column from my source (column) Wafer Sum = Summarized column Cumulative Sum = Running total of Wafer Sum per Index column (Quick Measure) Flag = Toggles between Yes and No based on following condition ( [Cumulative Sum] >= [Wafer Sum] * 0.5) (Measure) What I'm trying to accomplish is get the first occurrence when the Flag = "Yes" and return the Index value. In this case, the Index value returned should be 25. However, I cant use most of the functions such as EARLIER, MINX or CALCULATE since they are catered towards columns and not measures. Any help on this issue is appreciated. Thanks in advance!Solved3.1KViews0likes4CommentsHow do I return the first value by order related to an ID as a window function?
What I am working with: I have the limitation that my data is sourced from a sharepoint folder and it appends tables from about 24 excel documents for a grand total of 17,000,000 records and about 40 columns. Half these columns are ID columns so they have a large number of distinct values, and they use text in the key values. I know this isn't how things should be done, but this is what I have to work with and I have to figure it out. This is why the solution has to be in DAX (preferably calculated columns) because there is no database to fold the query back on, and when I tried this in power query I had to cut off the report at about 45 minuts of refresh time. I need the attributes to all stay in the same relationship to each other that they started in, so MINX() and MAXX() will not work. LOOKUPVALUE() also does not work because it is not feasible to duplicate the ID column, that hurts performance too much and refresh time is already at 30 minutes. What I have: ID_COLUMN NAME_COLUMN REGION_COLUMN 1 Jon west 2 Bob west 2 Mary east 2 Aaron south 3 Tammy north 3 Bill east 4 Judith south 5 Ally west 5 Josh north What I would like DAX to do: (See the last two columns) ID_COLUMN NAME_COLUMN REGION_COLUMN My_New DAX_Measure My_New_DAX_Measure_column_2 1 Jon west Jon west 2 Bob west Bob west 2 Mary east Bob west 2 Aaron south Bob west 3 Tammy north Tammy north 3 Bill east Tammy north 4 Judith south Judith south 5 Ally west Ally west 5 Josh north Ally west I am open to any suggestion that can get this solution.Solved6.2KViews0likes2Comments