MS ACCESS EXPRESSIONS - ms-access

Just a quick question regarding conditional formatting/Expressions. I have a form which holds information (Invoice Date, Payment terms, Payment Due, Days Left, and Paid).
Payment due adds 30 days on to the Invoice date and Days left shows us how many days left that it has.
My question is how can I make it so that when the tick box "Paid" is ticked then it sets the Days Left to 0 or Blank. rather than continuously counting down.

Could use an IIf() to conditionally adjust DaysLeft based on value of checkbox.
=IIf([Paid], 0, days left calc here)

Related

How to create a table of "Not used time" in spotfire

User wants to see a report of when resources are NOT being used during the work week on average.
Available to me I have a reservations table along these lines:
table
Attached is the picture of how the user would like the data represented. example graph
I think my issue lays in getting the data in the right format, how can I take a reservations table and inverse it so to show all available time in-between two reservations.
I was able to get a Bar graph that showed the average availability of the days that the resource was booked, but it didn't consider days that there was no reservation information, it also did not account for situations where the user had booked for more then one day.
Have you tried making a calculated column?
This worked for me:
1440 - Sum([Duration]) OVER ([StartDateTime])
1440 is the amount of minutes in a day. It subtracts the total amount of 'busy' time in each day from the total minutes in the day.
It is then easy to make a bar chart from this column.
This worked in my testing, but it might run into issues if you put it into practice. Keep me updated!
Table with calculated column, and barchart.

RunningCount/RunningSum Business Objects - how to reset every occurrence of blank

I have a table in Business Objects in which I have created a monthly date spine and I can see how many items a customer bought in a monthly period. What I am trying to do is count the number of months in which no purchases were made and then find the longest gap across the whole date range.
Here is a mock-up in Excel of what I have got so far in Business Objects:
As you can see I have a running count, but it continues counting every time a blank row is encountered. What I want is that the counting would reset every time a new blank entry is found. I could then find the maximum gap across the date range.
What it should look like is:
The formula I have at present is:
=RunningSum(IsNull([monthly_purchase]);([monthly_purchase];[date]))
How can I adapt this to get the result I want?
Is there a reason you need the running count of months? Or is the main objective to determine the maximum number of months in a row with no purchases?
Prior Month with Purchases = Previous([MonthEnd])
Months Between with No Purchase =If Not(IsNull([Prior Month with Purchases])) Then MonthsBetween([Prior Month with Purchases];[MonthEnd]) -1 Else 0
Maximum Gap With No Purchase =Max([Months Between With No Purchase])

Filter rows above X percent of group in WebI report

We are running BusinessObjects 4.1 SP06 Patch 4. I need to build a Web Intelligence report that will only show the fees categorized by Trans Code Desc that are above 5% of the Fee Schedule to which they belong. I can find the percentage easily enough by adding a break on the Fee Schedule.
My Transaction Percentage is defined as follows...
=Percentage([Total Transaction Amount])
So I how do I add a filter to only show the rows with a Transaction Percentage > 0.05? I have attempted to make Boolean variable called Transaction Percentage Above Threshhold...
=If([Transaction Percentage] > 0.05; 1; 0)
I am pretty sure I know what is happening. I believe it is considering the Transaction Percentage for the entire report, not just within the Fee Schedule group.
I can highlight the rows with a Transaction Percentage greater than 0.05 using Conditional Formatting.
How do I apply a filter or at least create a Boolean variable so that it can be filtered in Excel?
I knew that my problem was that my percentage was changing based on what was being filtered out. I did not want that. Basically, what I wanted was to show the percentage of each Tran Code Desc as compared to the total for each Fee Schedule even if some of the Tran Code Desc line items were filtered out for falling below the threshold.
I discovered another issue too. I had tried to simplify my situation for this question and left out a key detail in that there are more objects in my data set than I was showing. Therefore I was getting more than one line for some combinations of Fee Schedule and Trans Code Desc.
To get past these issues I created a few additional variables.
Fee Schedule Trans Code Total (eliminates multiple line items for some combinations of Fee Schedule and Trans Code Desc)
=Sum([Total Transaction Amount]) In ([Fee Schedule]; [Trans Code Desc])
Fee Schedule Total (prevents the total from changing with application of filters)
=NoFilter(Sum([Total Transaction Amount]) In ([Fee Schedule]))
Transaction Percentage (simple calculation using the previous two variables)
=[Fee Schedule Trans Code Total]/[Fee Schedule Total]
So here is the unfiltered result.
And here are the results filtered to only rows above the threshold. Note how the percentages or the remaining items have not changed after the application of the filter.
It seems like I am making this more complicated than it needs to be, but this works for me so I am going go with it for now.

How to display data for last few days but cumulate records from beginning of time in Tableau

I am building a Bar graph in Tableau to show daily cumulative record since January 2018. Due to number of days elapsed since then, the bars are so crunched that it looks ugly.
That said, how can I only display data for last few days while retaining the actual YTD count.
For e.g. starting January 1st I had 0 logins, February 1st - 100 YTD logins, March 1st - 200 YTD logins, April 1st - 300 YTD logins, and May 1st 400 YTD logins. I want the graph to display bars from May 1st only and show the starting count as 400 YTD logins and not zero.
PS: I am new to Tableau, so please assume that I don't know advanced stuff.
It seems that you are using Fit Width option which forces everything to be shown in your screen width. If so, try changing this to Standard, so that you may have control on the width of your bars and your users can see every month in one viz with a horizontal scrollbar.
If you do not want a scroolbar'd solution, you need to create fixed calculated fields to not get effected by the filters and use those new fields in your graph. At this point you may filter the date automatically (again with a calculated field based on the current date) or make your users manually filter what they want.
We may be in some more help if you can send a sample workbook but also you may play around with LOD expressions, FIXED keyword or simply get your calculations between { and } to fix them globally.
If you manually change the axis range, all table calculations, such as running totals, remain unaffected. You can do this by right clicking on the axis header, selecting "Edit Axis", then selecting the "Fixed" option under "Range", and choosing the dates you want to show.

How can I calculate YTD values in report?

My client has a standard report which shows monthly figures for various sales, enquiries etc. The report shows all months since the start of the contract (about three years ago, but growing by 1 every month!). The last row in the Tablix shows the totals (essentially the sum of all cells in that column above).
They have asked me to introduce another couple of rows, showing Year To Date values, for totals and monthly averages. I feel sure that there must be a way to do this simply (essentially it is the SUM or AVG of the last 12 rows in the Tablix), probably through grouping, but I just can't get my head around it.