Each participants gets X numbers of tickets. The number of tickets can change dynamically by day. I need help with the formula to fetch the ticket numbers each participants get.
Right now the columns for Ticket numbers are:
=IF(B2 > 0, D1+1,D1)
=C2+B2
This isn't quite right for obvious reasons.
Example: https://docs.google.com/spreadsheets/d/1jOqPXjtF1CqWg22z5z_XxhNv7CKuH12_JmuQHhLtdk8/edit?usp=sharing
Is this what you require?
=IFS(ISTEXT(B1),1,A2=0,0,B1=0,SUM(A1:A$2),TRUE,C1+1)
=IFS(A2=0,0,A2=1,B2,TRUE,B2+A2-1)
Related
I have two input dimensions i.e. Day and Product_sold and I want to create a calculated field "Flag" in Tableau. Basically Flag will show "Yes" if the product was sold on all days, else No (see example attached), can you please help? I have tried multiple things but no use
You can create a fixed LoD calculation to count distinct number of days in data. Then used another fixed LoD (or possibly a table calc) to count distinct days for each product. If the product COUNTD = dataset COUNTD than it sold on every day.
What have you tried so far? This looks like a simple attribution calc that could be put together as boolean eg:
Product_sold = 'computer'
Steve
I have a google sheet list of membership fees per user and per year. Currently it only highlights rows if a user id is already in the list and thus duplicate. This is how the conditional formatting formula looks like.
=countif($A:$A,$A2)>1
However, it is possible that a user is listed twice or even three times because the fees belong to different years. In this case, everything would be fine and the row does not need to be highlighted.
So the goal is to highlight all the rows where there are duplicate users with only the same year.
The headings/columns of the list:
User id || first name || last name || year || Amount
I would be glad if someone could help me.
Thanks in advance!
Use:
=COUNTIFS($A:$A,$A1,$D:$D,$D1)>1
I have two columns. Column A has multiple group types (i.e.: Group1, Group2, Group3) and Column B is a list of domains (i.e.: a.com, b.com, c.com, etc.).
The result I need:
To join, in a single cell, Domains from the same Group, separated by commas.
Regardless of the number of Domains from a single Group, this string of comma-separated values must not surpass a certain limit number of Domains.
The remaining Domains from the Group would appear in the following row, separated by commas (as many rows as necessary, never surpassing the maximum number of domains).
The adjacent column, to the left, would indicate the Group to which each string of Domains belongs.
In this example, there are three Groups and 26 Domains. The limit number of Domains per string is five: https://docs.google.com/spreadsheets/d/1q1LkUyOkdiNvHjw78S4EXx1xw2n1ggeYRbDUhOwAgcc/edit#gid=0
I don't know if this is too complex... hopefully, someone can share some insight. Thanks in advance.
You asked this question on the Google Forums as well. I posted my solution there since that's where I usually volunteer my efforts, but Player0 suggested I post here as well so here I am.
On your sample sheet on the tab called MK.Solution, you'll find this formula. I think it should get what you're after and work on larger datasets. I'm new to S.E. so I'm not entirely sure the protocol for including sheets formulae, so I'll just paste it for now and hopefully figure that out soon.
=ARRAYFORMULA(QUERY({SPLIT(UNIQUE(B2:B&"-"&INT((COUNTIFS(B2:B,B2:B,ROW(B2:B),"<="&ROW(B2:B))-1)/5)),"-"),TRANSPOSE(SUBSTITUTE(TRIM(QUERY(IF(B2:B&"-"&INT((COUNTIFS(B2:B,B2:B,ROW(B2:B),"<="&ROW(B2:B))-1)/5)=TRANSPOSE(UNIQUE(B2:B&"-"&INT((COUNTIFS(B2:B,B2:B,ROW(B2:B),"<="&ROW(B2:B))-1)/5))),C2:C&",",),,9^99)&"|"),", |",""))},"select Col1,Col3 where Col1<>'1' order by Col1"))
Cheers,
Matt
I've created a shared Google spreadsheet which tracks a sales rep contest for work. There is a column in my spreadsheet which requires the reps to enter in an alphanumeric code which tallies at the bottom. The problem is that some reps are using old codes which shouldn't be accepted, and I have to manually comb the spreadsheet at the end of every 6 months to make sure no one has cheated the system (there are money prizes involved).
I'm looking for some help to build a data validation formula which will achieve two things:
Reject any alphanumeric numbers below BR052300 (ex. BR040000 should be rejected, BR053000 is OK)
Reject duplicate entries
Thanks in advance for your help!!!
Please try something like:
=and(1*right(A1,5)>52299,countif(A$1:A1,A1)=1)
I have two tables in PowerBI and a slicer, presented below in an abstracted way.
I want to know the number of orders placed for a customer in a given date range. This data is a sample for illustration - there are actually around 10,000 Customers and 500,000 Orders and both tables have many other fields, Ids etc.
My challenge -
Whilst this is easy enough do by relating the tables and doing a count, the difficulty comes in when I still want to see customers with 0 orders and on top of that I want this to work within a date range. In other words, instead of the customers with no orders disappearing form the list, I want them to appear in the list, but with a 0 value, depending on the date range. It would also be good if this could act as a measure, so I can see the number of total customers that have not ordered on a month by month basis. I have tried outer joins, merge queries, cross joins and lookups and cant seem to crack it.
Example 1: If I set the order date slicer to be: 02/01/2017 to 01/01/2018 I want the following results
Example 2: If I set the order date slicer to be: 03/01/2017 to 06/01/2017 I want the following results
Any help appreciated!
Thanks
This is entirely possible with a Measure. When you're using the Order field to count the rows for each customer, you're essential doing a COUNTROWS() function.
With your relationship still active, we can Prefix this in a measure to check for the blanks, and in those cases, return 0. something like this would work
Measure = IF(ISBLANK(COUNTROWS(Orders)),0,COUNTROWS(Orders))
In this case, 'Orders' is the table containing the Order and Order Date fields