Forum Discussion
Fill down with several conditions
Dear all,
I want to achieve a fill down with several conditions. My table looks like this:
The Table name is "Test". It has the columns "Date of Change" which is a Date, Index Column, Measure Title and Spalte 2 which contains savings values. Spalte 2 only contains a value at each date where a saving occurs and changes the category. So there are some gaps. I want a new column which looks at which Date in "Date of Change" an value in Spalte 2 occurs and then fills down the occuring value. However, with two conditions. First, the fill down should only occur for those dates which are later than the non-blank entry and second they should stop before the date of the next non-blank entry in the next category. Then in the next category the value should be also filled down but again they should stop before the date of the next non-blank entry in the next category which would be IL 3c and so on. I also added an index column for all the categories if this simplifies the things. The procedure should be done for each Measure title individually.
Down below is a picture of a table with a filter set only on one Measure title. My problem is that my FillUpValue is not able to do the conditions based on the date and fills down all values... The stop at Category IL 4b is correct as there is no non blank value in Spalte 2 anymore.
The fill up column should look like this:
Here you can see that in IL 1 only two value exist as all values before the first entry in that category are cancelled and only one other value between the date in IL 1 and the next Date of the non blank value in Spalte 2 exists. In IL 2 only one value exists as no there are no dates between the date of change and the next non blank entry in Spalte 2. In IL 3c the value is filled down as no other non blank values exist so that all dates equal or later than the non blank value in IL 3 c are filled down.
Here is my acutal code for the column which does not work:
Thank you all for your help!!!
Best Tilla ❤️
1 Reply
- lbendlinSuper User
Filldown is usually done in Power Query. Do you need it to be dynamic?
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523