Calculating weighted weekly average - powerbi

I´m trying to calculate the weekly average of a certain value but I don´t know how Power BI is running to output what I get.
This is the table with the relevant raw data:
And this is what I´m getting:
For the week "6-OCT-12-OCT", the expected average should be 2.3% instead of the -28.29% shown.
Please, notice the value 1 is calculated as a "new measure". Could someone please tell me what is going on and how can it be properly done?
Thanks in advance!

Related

Having trouble getting a cumulative saving measure for a plot in PowerBi

As the title says, I can't sum [savings] cumulatively. My total savings measure only plots monthly saving not cumulative. Any help with the Dax for the measure would be greatly appreciated, I've tried a lot of solutions online to no avail.
Cheers
Power BI has a Quick Measure "Running Total" that is provided for exactly this purpose. Make sure you have a separate Date table and use that in the Field section.

PowerBi - Row total in Matrix report for measures in Direct Query report

Id appreciate some help with a problem that I would otherwise be able to crack in seconds in Excel but cant wrap my brain around in PowerBI
I have direct access to a SQL database and am looking to report on the percentage of times a person attends an Appointment. A measure 'No Show' calculates if they dont as follows:
No Show = IF(COUNT(Candidate[bookingId]) = SUM(Candidate[deleted]), 0,1)
Unfortunately, this means that the total No Show for each Candidate is 1, even if they didnt attend 2 or more appointments.
I cant cant wrap my head around whats needed to get the total No Shows for the Candidate.
In the example, the expected result is 2 No Show and 66% No show %.
[Current state and Desired State]
Ive included a sample view here >> 1
Appreciation in advance for any help

How to measure average sales using working days?

I'm using Power Bi desktop to create a sales dashboard, and ran into a small code issue.
I need to calculate average sales in a period of working days, and tried:
TOTALYTD([Sales];
dimCalendar[Date];
dimCalendar[WorkingDays]<=16)
16 is the related working day for 22APR2019 in Brazil.
After that I plan to divide it by a month count or another similar method.
The hard coded 16 works very well, however when I try to use another formula instead:
TOTALYTD([Sales];
dimCalendar[Date];
dimCalendar[WorkingDays]=CALCULATE(MAX(dimCalendar[WorkingDays]);
LASTDATE(dimCalendar[Date])
))
It gives an error that I can't use calculate in a true/false expression.
I tried to use calculated column, but doesn't work as well.
Do you have any idea of how I can create this measure?

How do you create a calculated cumulative total value column in a power bi matrix visualization?

I am pretty new to Power BI, but I'm learning alot fast. I do have one challenge at this point that has me stumped and I'm really not finding anything online that relates very closely.
I have created a basic matrix visualization that gives me sales totals by UPC code. The UPC code is in the Rows and the sales total is a Values column. I added a second instance of the sales as another Value to be calculated as a percent of the column total.
After sorting, I get a nice pivot table style look at the top selling UPC codes.
For the life of me, I can't figure out how to add a calculated column that will give me a cumulative total of the percent so I can do a Top 80 (80/20) analysis. I'm hoping someone can point me in the right direction.
To be completely clear, I want a column to the right of the '%CT Sold Total' column that gives me '14.40%' on the first row, '27.46%' (14.40% + 13.06%) on the second row, '36.41%' (27.46% + 8.95%), and so on.
Thanks in advance!
Finally wrapped my head around this (powerbi.tips/2016/10/pareto-charting) and it is exactly what I was trying to do.

Last Year Measure not displaying on grid when filtered

I am developing a dashboard on Power BI and i need to create a last year measure based on column FIELD MEASURE. The time level of the tale is DAY_ID (date), so i made a measure using
CALCULATE(TABLE1 [FIELD_MEASURE],SAMEPERIODLASTYEAR(TABLE1[DAY_ID].[Date]))
But when i try to filter based on a integer column called cd_mes the new metric just doesnt display on the grid. What could be the problem? The image is a little DER to help understand the problem.
Thanks in advance!
Sorry if my english is not good enough to understand the problem.
I think you are missing to use SUM() inside of CALCULATE()
Try:
CALCULATE(SUM(TABLE1[FIELD_MEASURE]),SAMEPERIODLASTYEAR(TABLE1[DAY_ID].[Date]))
or
CALCULATE(SUM(TABLE1[FIELD_MEASURE]),DATEADD(TABLE1[DAY_ID].[Date],-1,YEAR))