Skip blank cells until value added in Google Sheets - if-statement

I've created a budget sheet that includes a running balance in column E.
The problem that I've run into is my formula =IF(C140="","",(SUM($E139,C140))) works down the line after E140 (first day of the month that I started to implement this) until there is a blank. At the blank, the formula breaks for me. Now because this is a projected running total, it's preferred to have the blank spaces to allow for the days of the month.
I've tried a couple different ways to get the isblank or lookup formulas to work but I realize this is beyond my excel and google sheets knowledge. Is there a way to get the formula to skip the blank cells down column E and just use the last value, ie $598.66 in E143 when you get to the next cell that has a value in it, ie E151?
Photo added for reference....

try:
=ARRAYFORMULA(IF(E2:E="",,MMULT(TRANSPOSE((ROW(E2:E)<=
TRANSPOSE(ROW(E2:E)))*E2:E), SIGN(E2:E)^0)))

Related

'OR' Filtering on Columns in PowerBI

I've got an oddly set up google sheet as my data source for a powerBI dashboard. Right now my main stress point is a 'last 7 days' filter that needs to be applied. The problem is that there are multiple columns containing dates that could be in the last 7 days, in this case representing multiple steps in an email chain.
If any one of those columns contains a date in the last 7 days, then I need to capture the row in most of my visualizations and tables, but if I just use standard filters, PowerBI assumes 'AND' and displays none of the rows, since there will almost never be a row where multiple date entries are in the last 7 days.
I'm almost certain there is a way to do this with either merged columns or calculated fields, or maybe there is even something as simple as an 'OR' filter, but thus far my googling has not turned up anything. Do you know a work around for this?
Thanks in advance!
In Power Query Editor, create a duplicate column for each of your date fields.
Make sure each of the duplicated columns is in Date format and then calculate the "Age". You will get a time value. In the Transform pane, use the "Duration" function and convert to "Days". Do this for each of the duplicated columns.
Now the last step: Create a "conditional column" in the "Add column" pane, and pull all of these new columns that should now have integer values and set the condition to show "Yes" if less than or equal to 7, "No" if more than 7.
Let me know if this helps.

Issue with Google Sheets IF formula

I'm trying to create an attendance tracker and need help with a small tweak to a formula.
Right now I'm using the following formula:
=IF(sum(G13,H13)=0,"TBD",AVERAGE(G13,H13))
Assume there are two cells (Day 1, Day 2)
Certain numbers are entered into the cell depending on if present (1), late(0.5), or absent(0).
Right now the formula is set to put "TBD" if no data is entered into a cell. As soon as a number is entered it will average the two cells together and give a percentage in another cell. The issue I'm having is if someone is absent both days. In that case it will still give a "TBD" in the final cell and I can't figure out how to get it to only give TBD if the cells are empty. If a 0 is put into a cell I want it to average it likes it does for the others.
try:
=IF((G13<>"")*(H13<>""), AVERAGE(G13:H13), "TBD")

Power BI - Measure returns blank randomly when filters are applied

I have two measures, which calculate the same amount for 2 different columns (i.e. total for person and total for the site) and returns the person/site having the highest amount.
I have report level filters on both Person and site. When playing around with these filters (either person or site), sometimes the measure returns blank randomly.
i.e I filtered to a single person and got the following:
Now, when I open ANY MEASURE IN THE REPORT, and simply add a blank line or remove a blank line (it refreshes the report I guess):
The measure will now show the proper value. The fun part is, I did not change the measure at all, just added a blank line or removed it and hit enter. The problem occurs randomly for both person and site measures.
For obvious reasons, I cannot expose many details here. Please let me know if you have to look at measures, I will post dummy ones.
Any help would be appreciated, Thank You!
Replacing the RANKX(Rank = 1) filter with TOP N did the thing.
The measures were using RANKX to generate a table variable, which was then filtered with rank = 1 condition. Sometimes, the table was not having rank 1 at all, the ranks started from 2,4, etc. I am still not sure what was the root cause of ranks not calculating properly.
Using TOPN function eliminated the rank filtering thing and the measures are now functioning properly.

PowerBI: Last 3 Non Blank Values from column

I have a table where I get the status of the employees tasks day by day.
As in below image I get the values(Confidential, so just entered dummy data).
Then I did unpivoted the dates column and made a copy of that and split with space so that I can get the date value.
Here I would like to show the last 3 commented values in a table visualization for each task.
Like as in above image, if the 5/31/2017 value is not available, then it should get the values of 5/29/2017 plan, 5/29/2017 actual, 5/30/2017 plan values i.e nothing but the last 3 non blank values.
Any suggestions please.
Mohan V
I think i got the solution.
I did mentioned in Top N filtering of visual level filter of fields.
And it worked for me.
Thanks for the hint #user5226582

Merging data with a dates table gives strange behaviour when some recordfield is added

I'm using Crystel Reports again after not touching it for about 8 years.
I'm having this situation...
I have 1 data table, and 1 table with just day numbers from 1 to 31.
Nothing is really linked between each other.
In my report I let the user select a reference date.
From that date I grab the maximum days of the month.
The report lists a row per day of that month but there are no actual database fields inthere. Just the first 2 letters of the dayname, the day number and another formula based field showing 'yes/no' or '' depending on a main record value.
So far so good.
In the group header I was adding the fields from the main datatable which went all fine until I added fields that in the query on the sql server rely on some cases but CR just read it out as 1 singe record row with everything in it.
For some reason the report generation goes from 1-2 seconds to 30-40 once I add that field that just outputs 'X' or ''. (it represents things assigned to that user)
Other reports where I'm using the same data still generate in 2 seconds.
To get this working right and to eleminate double date records I'm stuck with 3 groups.
I think this ain't optimal and the reason for the slow down although it wasn't there at the start.
So I was wondering:
Should I go for a sub report for the day listing?
Can I feed the subreport with my date parameter?
or is there some kind of scripted way to list a row x-times without all the grouping requirements?
Synchro was right, the problem was in the actual query/view.
For some reason the view takes half a minute longer if you just added an order by to a specific field.
The "where id between 211 and 265 or id=67" has been moved from a joined view to the actual query.
Thanks for the hint, Synchro.