How to calculate the difference between the total of a column and a value in the column of a measure in Power BI? - powerbi-desktop

I have a column in my matrix table that is a measure called Avg Clinic Visit per Session. I applied the totals to the columns in the matrix. I want to be able to subtract a row in the column from the total. For instance, I want to be able to subtract Charles Prague Avg Clinic Visit per Session of 8 from the column total of 9 to get the difference of 1.
I have tried everything I know, but I can't figure it out, and I have been searching for days to find an answer. I do hope that someone on this site will have a simple answer to my problem.
Thank you in advance.
My Matrix

Related

Average using excel formulas

hope it's been a good holiday.
Had a question regarding excel, that can best be phrased through an example.
I have a table which has 4 columns and 2 rows. in the each of the 4 inputs in row 1, we have a $ amount our company has (100000, 150000, 200000, 175000), and in row 2 we have the amount of product which we've been able to purchase, note: this products doesn't have a fixed price, and is constantly changing. Row 2 has the values (10000,20000,22000, 18000 respectively for the above $ amounts).
I want to have a cell, where if I input the dollar amount, I have, it will give me the average amount of product I can buy based on the historical data. Also, I need the formula to be dynamic, i.e once I add a fifth column, it takes the average using 5 datapoints, instead of the previous 4.
Thanks for any help, was having problems uploading an excel to display this, so hope this suffices.
I tried various look up/index formulas with no luck.
You want FORECAST.LINEAR():
=FORECAST.LINEAR(C6,2:2,1:1)

How to calculate no of days where sales were made in MS excel using sumifs and countifs?

I am working on an excel sheet where I am required to calculate average number of days the stores in a city were able to make some sales. I am attaching a sample of the table for reference. The values in the cells represent the number of units sold(not relevant to this question).
Here across NY, two stores are present, and out of the total number of days in consideration (3*2), only 4 days some sales were made, making the average 66%.
Similarly for Paris, there exists only one store which was open across all days.
To arrive at the figures, I tried using nested countifs and SUMIFS , but did not receive the expected results. Also, in some of the older posts, users had suggested to use INDEX MATCH with SUMIFS, but I was not to get accurate results using these.
Can anyone help me to get the correct figures for Total days, and Days with some sale.
SUMPRODUCT SOLUTION
=SUMPRODUCT(--(A$2:A$5=A8)*--(C$2:E$5<>""))
=SUMPRODUCT(--(A$2:A$5=A8)*--(C$2:E$5<>"NO SALE"))
=ROUND(C8/B8,4)
First, according to your grid NY made sales on 4 of the 6 days. (NY1: Mon, Wed; NY2: Tues, Wed). Thus the average is not 50% but 66%.
Second, to get your formula. Assuming "Place" is in column A. Below is for NY, you can solve for the rest.
Total number of days:
In cell "C9": =COUNTIF(A2:A4,"=NY") * 3
Days with sales:
In cell "D9": =COUNTIF(C2:E2,"<>NO SALE") + COUNTIF(C4:E4,"<>NO SALE")

Average daily max/min temperature if within date/time range in Excel

I have the following array formula which calculates the average daily temperature for a season (outlined in more detail here: Average day and night temperature in excel).
=AVERAGE(IF(Sheet1!$C$7:$C$17622>=$A$20,IF(Sheet1!$C$7:$C$17622<$A$21,IF(Sheet1!$B$7:$B$17622>=$B18,IF(Sheet1!$B$7:$B$17622<$B19,OFFSET(Sheet1!A$7:A$17622,0,(COLUMN(Sheet1!A$7)*3)))))))
The OFFSET function is to account for alternating columns of temperature and humidity for each site (site temperature/humidity are in columns in Sheet1; there are four columns for each site, hence the *3).
I can get the absolute maximum for each season by replacing AVERAGE with MAX.
However, I would like to obtain the average maximum/minimum daily and nightly temperatures for each season, but I cannot figure out how to do it (after several hours). I'd appreciate it if anyone could help me out here.
Sample data here:
https://www.dropbox.com/s/9brbxjbcrhjwrhc/Climate%20by%20season.xlsx?dl=0
Just add 1 extra column to 'collect' you daily maximum temperature and 1 more column for daily minimum temperature. Then use the same AVERAGE or AVERAGEIFS formula to work on each of these column to obtain your intended results.
Hope that helps. ( :

Excel incorrectly calculating the average of numbers when using division

I am trying to work out the average of scores for the male artists. When I tried using the AVERAGEIFs function it returned a #VALUE error and therefore I have created a table to work out the average manually. The expected score is 3.9 however when I use my table which adds up all the scores and then the number of scores which are not blank and divides the total score by number of scores the answer is 3.4.
Could you please advise on why this would be and if there is a way to calculate the average of male artists?
Here is an image of my spreadsheet:
To my knowledge, AVERAGEIFS() works on a single column / single row.
Thus, you need a helping row, showing you the AVERAGE per person, and then taking the average, with conditions such as Gender and Job.
I have 6.5 with this formula:
=AVERAGEIFS(F2:F5 F2:F5,B2:B5,B2,A2:A5,A2)
It simply gives the average of 2 and 11, as they are the only 2 male artists in my sample.
MSDN AVERAGEIFS
If you do not like the idea of additional column, then making a PIVOT table would be a good solution.

Excel Formulae needed to calculate weight loss

Myself and some friends are taking part in a weight loss challenge this year and I will be recording monthly weigh in's and body measurements. I need to find a calculation which will work out the difference's in inches and pounds.
I have the item title in column B from row 10 down to Row 17. The first one in Row 10 is weight which is calculated in pounds.
Then going across from Column C is the month starting with Jan ending in December in Column N.
The total loss needs to be updated after every monthly entry into column O.
Unfortunately I cannot post a picture of the table as I'm new to this group.
I've tried other formulaes suggested to people with similar problems but they don't work for me.
Can anyone help?
Many Thanks
Helen
Bit hard to work it out from your description but I think you are looking for
=C10-MIN(D10:N10)
That assumes the largest figure will always be in column C and will update every time a new entry is placed in the row.
If the weight might go up (not that you are going to fail the challenge) you could use
=C10 - LOOKUP(1,1/(D10:N10<>""),D10:N10)
This should do the trick. (And you can copy down to other rows as necessary)
=INDEX(C10:N10,1,COUNT(C10:N10))-C10
INDEX used here, returns the value from the range C10:N10 in the first and only row, where the column is determined by the count of values already entered. So if you have values entered for 4 months, the formula will take April's value and subtract January's value.
A negative number will represent weight loss. A positive number means weight gain.
Total fat loss :
(AVERAGE(C10:N10) - C10)*2

Resources