Forum Discussion
What does this formula mean?
OPS-MLTSD Looks like a column formula, yes? It's really pretty atrocious DAX in my opinion.
The CLIENT_IND variable is calculating the sum of the Targets achieved to date (#) column in the table Table1 filtered to where the CATEGORY column is "Number of Clients" and the PROCESSLOGID is equal to the "current" value of PROCESSLOGID (EARLIER). The current row's value in other words. The next variable, CLIENT_SURVEY is saying that if the maximum value in Table2 of the column Report Submission #, assuming a related table is "Activity Report#1" and the maximum value of the type column in Table3 is "5C" then return the sum of the INTAKE column in Table4, otherwise it is set to BLANK() (null). The final return statement is if the number of rows in Table1 that have a CATEGORY of "Number of Clients" and where the PROCESSLOGID is equal to the current row's PROCESSLOGID is not BLANK() (null or empty) then return the CLIENT_IND variable value, otherwise if it is blank, return the CLIENT_SURVEY variable value.
Greg_Deckler Thank you so much for the explanation! haha I agree with you, this dax is rather atrocious! Just wondering if you have any idea why the EARLIER function is used here in the first place? It is throwing me off