Hello. I have this new column "line Seperation" coded to get me an increnmenting number that coresponds to a line EX. three rows if data might correspond to #1 and the next 5 rows to #2 . My main question is if there is a way to simplifly my code and then an easier way to set it up so it is automaticly applied to new data I add in.
I know its a lot and might be difficult but I would really appriciate the help.
your question to simplify your DAX and prepare for automation is not that simple to answer, but it seems that you already have the answer you are looking for ;-)
First, the DAX could be simplified by modifying your data model and adding a separate table that contains the ID and testcondition2 as columns then you could use LOOKUPVALUE to "pull" the value from this new table, instead of an evergrowing nested IF. But I think this would be just a smaller optimization, if ever possible.
If none of the already given answers matches your requirement please consider describing the underlying rule(s), that builds the nested IF...
From the data I derive the following:
the starting value for the first testcondition2 of id 4 is 4 because id 2 has three values for testcondition2
basically, the numbering of the testcondition2 for each id is determined by the alphabetical order of the values of testcondition2
Wondering how many different possible values for testcondition2 exist.
Hamburg - Germany If I answer you question, please mark my post as solution, this will also help others. Proud to be a Datanaut!