previous quarter
3 TopicsHelp with Last Quarter Formula
I calculated the sum for last quarter and last quarter previous year but they only work when I plot them against a time period. I am trying to plot it against customer name instead and the measures just return blanks. My data has sums of activity by quarterly dates only, not daily. These are my measures that are working but only if plotted against date logic. Net Added Last Quarter = CALCULATE(SUM(OWSSummaryByQuarterByEU[channel_licenses_net_added]), PREVIOUSQUARTER(OWSSummaryByQuarterByEu[End of Quarter].[Date])) Net Added Last Quarter Prior Year = CALCULATE([Net Added Last Quarter], SAMEPERIODLASTYEAR(OWSSummaryByQuarterByEU[End of Quarter].[Date])) Does anyone have a formula that would give me the sum of last quarter when not plotted against time? I'm assuming it needs to be a calculated column but everything I try is returning blank or error. Willing to try DAX or Power Query solutions.1.2KViews0likes7CommentsDAX - Last year customer retention
I have a measure that calculates customer retention: customers who bought in the last 3 months. I need to bring the comparison of this measure from the previous year. I tried the formula below without success. customer retention: customers who bought in the last 3 months. Frequencia pedidos Trimestral = VAR AllOldCustomers = CALCULATETABLE ( VALUES ( fVendas[Nome do PN] ), fVendas, fVendas[Data NF] < TODAY () - 90, fVendas[Documento] = "Nota fiscal de saída" ) VAR AllNewCustomers = CALCULATETABLE ( VALUES ( fVendas[Nome do PN] ), fVendas[Data NF] < TODAY () , fVendas[Documento] = "Nota fiscal de saída" ) RETURN COUNTROWS ( EXCEPT ( AllNewCustomers, AllOldCustomers ) ) comparison of this measure from the previous year: Frequencia pedidos Trimestral PY = VAR PreviousYearDate = DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), DAY ( TODAY () ) ) VAR AllOldCustomers = CALCULATETABLE ( VALUES ( fVendas[Nome do PN] ), fVendas, fVendas[Data NF] < PreviousYearDate - 90, fVendas[Documento] = "Nota fiscal de saída" ) VAR AllNewCustomers = CALCULATETABLE ( VALUES ( fVendas[Nome do PN] ), fVendas[Data NF] < PreviousYearDate , fVendas[Documento] = "Nota fiscal de saída" ) RETURN IF ( ISBLANK ( ( COUNTROWS ( EXCEPT ( AllNewCustomers, AllOldCustomers ) ) ) ), 0, COUNTROWS ( EXCEPT ( AllNewCustomers, AllOldCustomers ) ) )Solved1.2KViews0likes3CommentsDAX Previous Quarter with date table that can span over years
In my data model I have two tables, one is named "Sales" and the other is my "Dates" table. The Dates table is flagged as a date type table. In my Sales table I have a SoldOn date and the data type is date. I join the SoldOn date to the Date in the date table in my model. Now I want to calculate the previous quarter data and be able to move across years. I already have a measure in the model named GrossSales, this is what I want to see previous quarter totals on. First I try this: PVQTR:=CALCULATE([GrossSales], PARALLELPERIOD('Sales'[SoldOn], -1, quarter)) And this works using the date from the Sales table, but in my report I want to use the Date table to filter this data. So in my date table I have a value for Year Quarter. I want to use that in a slicer so the user can select the starting quarter. Even though those tables have a relationship, the measure above does not display the correct previous quarter when slicing on a value from the Date table. If I change the measure to use the date value from the Date table it doesn't work at all. PVQTR:=CALCULATE([GrossSales], PARALLELPERIOD('Dates'[Date], -1, quarter)) I feel like I am missing something simple here. Any feedback is appreciated.Solved899Views0likes2Comments