yoy
5 TopicsCreate YoY Measure without error A date column containing duplicate dates was specified in the call
I am a novice at PowerBI and I'm very confused with measures and dates at the moment so any guidance would help. I'm trying to create a few year over year charts/tables that are counting the number of items created by the date created. This is what I have right now: A date field Created On A title field Title A measure ItemCount = COUNT(table[Title]) A measure ItemCount LY = CALCULATE(COUNT(table[Title]), DATEADD(table[Created On], -1, YEAR)) I then tried to check if my measures worked by creating a table. I put the Created On field with only the year in the date hierarchy and the measure ItemCount. That came out fine. But when I tried to add ItemCount LY I received the error "A date column containing duplicate dates was specified in the call to function 'DATEADD'" I researched this error and I understand that measures need aggregated data to work and I guess the created on field that I was referencing has multiple items with the same date. But I don't understand how to proceed. How can I get unique dates? I've looked up functions that could retrieve only unique dates, or I've seen people suggest creating a date table, but this report is not using a directquery connection. So my ability to make new columns and tables is disabled which seems to be hindering me a lot. I can only create measures. Is there any way forward?Solved1KViews0likes5CommentsGrowth - Same period last year
Hello Everyone! I'm facing some difficulties in calculating the YoY Growth (sharing QTD sales vs the same period last year) I'm using the formula below to calculate the QTD Orders from this year, and the result is coming right QTD Sales = CALCULATE(COUNT('Orders'[Order Date]),DATESQTD(('Calendar'[ Date]))) The problem is in the formula that calculates the same period from last year: Last Year QTD Orders = calculate(count(Orders'[Order Date]),DATESQTD(DATEADD('calendar'[ Date],-1,YEAR))) It's bringing the result from the WHOLE quarter last year, not from the same period as this year (QTD) I've tried to calculate using the SAMEPERIODLASTYEAR and I got the same results. I don't know if the problem is in my calendar, which was built this way: Calendar = var mindate = year(MIN('Orders'[Order Date])) var maxdate = YEAR(MAX('Orders'[Order Date])) return ADDCOLUMNS( FILTER( CALENDARAUTO(), YEAR([Date]) >= mindate && YEAR([Date]) <= maxdate ), "Year", YEAR([Date]), "Month", FORMAT([Date],"mmmm"), "Month_Number", MONTH([Date]), "Quarter", FORMAT([Date], "\QQ" ) ) I already marked the calendar as date table. Thank you so much in advance2KViews0likes2Comments'Excess' Data when using YoY and QoQ measures
Hello, I am trying to get some analytical output for my report using QoQ and YoY measures in Power BI. But when put into a figure it displays data I do not need to show. My question is then, how can I limit the 'output' of my measures to fit what I need? QoQ Measure: Volume_In QoQ_Nominal = IF( ISFILTERED('Date'[Date]), ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."), VAR __PREV_QUARTER = CALCULATE( SUM('DATA'[Volume_In]), DATEADD('Date'[Date].[Date], -1, QUARTER) ) RETURN __PREV_QUARTER ) YoY Measure: Volume_In YoY_Nominal = IF( ISFILTERED('Date'[Date]), ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."), VAR __PREV_YEAR = CALCULATE( SUM('DATA'[Volume_In]), DATEADD('Date'[Date].[Date], -4, QUARTER) ) RETURN __PREV_YEAR ) !To be noted: The Data I work with is within the period Q1 2019 to Q2 2021, and I am using a slicer to define the quarter I want to see, which can be seen to the right. Now, the problem is, that too much (and too little) data is shown in my figure (below): 1: The Chart is filtered using the beforementioned slicer. Though I would like it to show the QoQ and YoY values as they are available and will strengthen my output (this also applies for YoY values for all 2020 quarters in the figure). How can this be done? 2: I am only working with 'current' data in the sense that I only want to show actuals data from full quarters. When I choose to show data up until Q2 2021 in my slicer, I do not want the figure to show the YoY measure for Q3 and Q4. How can this be done? I hope I have explained my problem well enough for you guys to understand! Kind RegardsSolved1.1KViews0likes3CommentsYoY reduction in headcount based on annual percentage value
Hi, I am trying to calculate year over year reduction in headcount as per a given percentage value of previous year’s headcount. The logic is as follows: Initial Headcount = 10 Percentage reduction annually = 20% So, Headcount in 1st Year = Initial Headcount – (20% of Initial Headcount) = 10 – (20% of 10) = 10 – 2 = 8 Headcount in 2nd Year = Headcount of 1st Year – (20% of Headcount of 1st Year) = 8 – (20% of 8 ) = 8 – 1.6 = 6.4 Headcount in 3rd Year = Headcount of 2nd Year – (20% of Headcount of 2nd Year) = 6.4 – (20% of 6.4) = 6.4 – 1.28 = 5.12 Please help in doing the same! Thanks in advance!1.2KViews0likes4CommentsDAX Weekly YOY
Hello everyone, I need some help in DAX and I would really really appreciate any inputs. This is my Quotes_Year_Wk table Year_Week Quotes 2019-25 13,582 2019-26 13,112 2019-27 12,908 2020-25 20,927 2020-26 21,126 2020-27 26,064 I want to calculate weekly YOY for quotes by using Year_Week column For example, I want to know the YOY change in week 25. From the table above, I want to get 2019-25 13,582 2020-25 20,927 Wk_YOY = 20,927/13,582-1 I honestly have a hard time figuring out the correct DAX to get the vakue I needed :'( Thank you so much! Newbie_2020Solved1.3KViews0likes2Comments