previous year
8 TopicsCurrent Month vs Previous Month and values when changing the year
Hello, I am trying to compare 2 columns: - Current month values vs. - Previous Month Values To do that, I´ve developed 2 Measures: - Total of Current Flight Hours Total Horas Vuelo Mes Actual = CALCULATE( (SUM('PROGRAMACIÓN REAL ENERO 2022'[Duracion del vuelo (sg)])/3600)) and - Total of Previous Month Flight Hours Total Horas Vuelo Mes Anterior = CALCULATE(Medidas[Total Horas Vuelo Mes Actual], FILTER(ALL(dDate), dDate[Año]=SELECTEDVALUE(dDate[Año]) && dDate[MesNro]=SELECTEDVALUE(dDate[MesNro])-1) ) I also have the porcentage (%) between Flight hours of current month and previous month: %Dif. Horas de Vuelo Mes Actual = (([Total Horas Vuelo Mes Actual]-[Total Horas Vuelo Mes Anterior])/([Total Horas Vuelo Mes Anterior])) However when I´m visualizing those three columns, when changing the year (for example, between Dec 2021 and Jan 2022), previous month is BLANK (see the picture attached) How can I manage it to get the value from December??? Thank you for your help!!Solved1.4KViews0likes5CommentsFinding the Last Value for Last/Previous Year in DAX
Hi there, I need help with something that in theory should be quite simple to accomplish, but although I've seen similar examples, not anything quite the same. SOURCE DATA I have a table loaded into my data model with a list of transactions which are date stamped in one column. Another column provides the value of the transaction, and a third provides a asset reference ID. REPORT CANVAS On the report canvas, I've created a table where rows begin by asset reference ID. In the second column I want to provide the value of the last transaction in the current year for that asset reference ID (this may be the same as last year if we have not had an updated value for this year yet). The third column needs to contain the last value provided in the previous calendar year. Obviously the first column is quite easy, and I have all my asset reference IDs listed. The second column I found the following DAX to do the trick: Asset Value TY = lastnonblankvalue(Asset_Value[Date], max(Asset_Value[Value])) However, I am struggling on how I would adapt this (or completely different approach) to find the last value provided for the previous calendar year for the third column. Can anyone give a helping hand?5KViews0likes11CommentsSum of Next 7 Day Sales
This is a 2 part question: today is 7/13/22 I am trying to calculate my COGS for the next 7 days based on LY COGS. I started my measure with trying to calculate LY COGS but as you can see in the photo below they seem to be off by 1 day...what am i doing wrong? COGS Next 7 = CALCULATE( [COGS], DATEADD('Date'[Date], -1, YEAR)) Once I have that I would like to do a rolling sum of 7 days looking forward. so my true COGS Next 7 would equal LY COGS 7/13/22-7/19/22 - 82,858 How do i create that DAX??? PLEASE HELP 🐵Solved817Views0likes1CommentHow to get previous year with partial periods
Hi. I've seen many variations on this but none that actually address my scenario. I am trying to get the count of tickets from the same dates last year, which may or may not involve partial periods, but no matter what I try (DATEADD, SAMEPERIODLASTYEAR, PARALLELPERIOD), the count I get back is for the entire month of whatever ending date is being used in the date slicer. Details: The Date slicer (Between option) defaults to whatever starting date the user selects thru TODAY() (which is when my date table ends). Thus, the end date is not physically selected by the user, it's just populated automatically. So if the date range is Feb 1, 22 thru today, what I keep getting back from my PY formula attempts is Feb 1, 21 thru Apr 30, 21 (not Apr 21, 21). I saw a comment from amitchandak in another post that said something about time intelligence formulas requiring the end date to be specifically chosen. So when an end date is specifically selected, it works fine, but the user shouldn't have to specifically select "today"s date. I have formulas that extract the start and end dates (see below) but I can't figure out how to pass those dates into a formula using the above options. I fear I am either overcomplicating it or trying to oversimplify it. Can someone help me complete the formula or give me a different formula that should work? Please. PY Count = VAR min_date = CALCULATE( MIN('DATE Table'[Date]), ALLEXCEPT('DATE Table','DATE Table'[Date]) ) VAR max_date = CALCULATE( MAX('DATE Table'[Date]), ALLEXCEPT('DATE Table','DATE Table'[Date]) ) RETURN CALCULATE('Incidents'[Inc Count], what do I put here to get previous year only thru the max_date of the previous year?)Solved2.2KViews0likes2CommentsGet Previous year from selected year
Hello, Need help please ! I need to get value of previous year depend year select with a slicer. When I select 2021 I want to see value for 2020. how can I do that ? I try to use SELECTEDVALUE : CALCULATE(sum(value), YEAR(date)=SELECTEDVALUE(Col1)-1)... Thank YouSolved15KViews0likes3Commentsdynamic time shifting
I am working with a group of public traded companies all with different year ends. For example Apple's last year-end was September 30, 2020 while Target's was Jan 31, 2021. I am trying to build a measure that will dynamically allow me to pull in a series of year ends for both companies. The last year end I can handle with the LASTYEAR function, but I am having trouble dynamically pulling in dates for previous years. PREVIOUSYEAR and DATEADD functions don't seem to work because they key off of my dateDim table, which can't tell between different year ends. What I need to be able to do is move back one and two years from the LASTYEAR value, but can't seem to find a way to do this. For example, my LASTYEAR value for Apple is September 30, 2020 and for Target is Jan 31, 2021 as expected. But my previous year value for Apple is still September 20, 2020, which is not correct, while the previous year value for Target is correct. Not sure how to handle this. Any ideas how to handle this dynamically. Many thanks1.4KViews0likes2CommentsBar chart by quarter including last quarter from previous year
Hi there, I currently have a report that shows me a selected year's metrics by quarter on a bar chart: However, I would like this view to also show me a bar for the last quarter of the previous year for comparison, that would still show up even if I have a page level filter for Year. For example: if I filter my page to the year of 2018, I still want to see the last quarter of 2017 on my bar chart, to the left of the 2018 quarters bars, ideally looking something like this: Is this possible? How can I achieve this or something similar that serves the same purpose? Thanks in advance!Solved7.5KViews0likes5Comments