mom
8 TopicsHow to get Mom, QoQ and YoY% calculation change
Hi All, I have a question on how to calculate Mom, QoQ and YoY% change and then use it on line and clustered column chart. My data somewhat looks like this. So, for 2022 Mar to 2022 April the sales got increased from 7891 to 9623, I need that to show as MoM percentage growth and similarly for the rest. Can anybody please help me with this? Year Quarter Month size 2022 Qtr 1 March 7891,78 2022 Qtr 2 April 9623,21 2022 Qtr 2 May 6853,63 2022 Qtr 2 June 1528978 2022 Qtr 3 July 195737,1 2022 Qtr 3 August 168077,9 2022 Qtr 3 September 294695,8 2022 Qtr 4 October 23159,34 2022 Qtr 4 November 214343 2022 Qtr 4 December 42684,12 2023 Qtr 1 January 150256,5 2023 Qtr 1 February 167633,6 2023 Qtr 1 March 167716,5906Views0likes1CommentInvoice Checking for automation purposes
Hi PBI Community I want to create a DAX measure which returns a "✓" when the invoice amount posted is equal to the same as the previous journal entry posting. and a "✗" when the invoice amount is different. It needs to be conditional on the Amount being posted to the same G/L Account ID and the same Vendor Name. I made the following, but it doesn't consider the element of previous journal entry posting or whether it is the first posting for that Vendor and related G/L Account ID. Automation Check = if(ISBLANK([TY (EUR)]), blank(), IF(CALCULATE([TY (EUR)] / [€ Avg.]) = [# Postings], FORMAT("✓", "Green"), FORMAT("✗", "#Red") )) How could I change it so that the measure returns "x" when it is first postings as well, and not only compares total amount / avg. posting = count of postings. The matrix visualization looks like this right now:526Views0likes1CommentHow to show the percentage change of sales from the previous month instead of the cumulative percent
Hi I am a Junior BI Developer. This is training data i created to simulate what i am trying to do. Which is to show just the Monthly percentage change in sales for the current month. I have a solution but from my image below PowerBI keeps giving me the total percentage change highlighted in green. I want the final value in the Alt MoM Sales % or the MoM Sales % Column which is 33.33% highlighted in red. Formula Used is below: Total Sales = SUMX('Fruit Sales', 'Fruit Sales'[Sales]) /* This is for previous months sales */ Last PM Sales = CALCULATE([Total Sales], PREVIOUSMONTH('Fruit Sales'[Date])) MoM Sales = [Total Sales] - [Last PM Sales] MoM Sales % = DIVIDE([MoM Sales], [Last PM Sales]) /*An alternative formula to find the previous month's sales */ Alt PM Sales = CALCULATE([Total Sales], PARALLELPERIOD('Fruit Sales'[Date], -1, MONTH)) Alt MoM Sales = [Total Sales] - [Alt PM Sales] Alt MoM Sales % = DIVIDE([MoM Sales], [Alt PM Sales])Solved5.3KViews0likes4CommentsMOM Calculation based on Last Day of Month
Hi Team, We are storing last day of month as key in our fact tables. We need to calculate mom but I see the previous month value is coming as blank because it doesn't fall on last day of month. Exmaple: For April 2022, Lasy day is 2022-04-30 when we use dateadd(month,-1) then it falls on march 30 and It's expected to be 20220331. Please suggest how to resolve it As per our design, we have below logic Is Latest (( we keep track to latest date from Fact) Latest Sales Date Key 20220430 Date (( Standard Date Tables) FactSales DateId SalesAmount 20220430 200 20220331 300 DAX Code: PrevLatest is not working as expected 'Fact Sales'[Sales] = CALCULATE(SUM('Fact Sales'[Sales Amount])) Sales MoM:= VAR Curr = 'Fact Sales'[Sales] VAR Prev = CALCULATE ( 'Fact Sales'[Sales], DATEADD ( 'Date'[Date], -1, MONTH ) ) VAR LatestDateKey = MAX ( 'Is Latest'[Latest Sales Date Key] ) VAR LatestDate = CALCULATE ( MAX ( 'Date'[Date] ), 'Date'[Date Key] = LatestDateKey ) VAR PrevLatest = CALCULATE ( 'Fact Sales'[Sales] DATEADD ( TREATAS ( { LatestDate }, 'Date'[Date] ), -1, MONTH ) ) VAR CurrMOM = IF ( ISBLANK ( Curr ), BLANK (), Curr - Prev ) VAR LatestMOM = IF ( ISBLANK ( Curr ), BLANK (), Curr - PrevLatest ) RETURN IF ( ISCROSSFILTERED ( 'Date'[Date] ), CurrMOM, LatestMOM) Thanks, AbhiramSolved1.3KViews0likes2CommentsHow to create a categorical column based on the quarterly growth of price?
Hi, I have sales data like the following: Date Product Price Sales 2020.04.01 AAA 60 600 2020.05.01 AAA 60 900 2020.09.01 AAA 70 700 I want to get a report based on the price changes: Category Time Total Sales New Sales 2020Q2 1500 Price Increase 2020Q3 700 So far, I'm able to create new measures based on the quarterly price change: VAR __PREV_QUARTER = CALCULATE( AVERAGE('pricing'[price]), DATEADD('pricing'[date].[Date], -1, QUARTER) ) VAR __NEXT_QUARTER = IF(DATEDIFF(LASTDATE(pricing[date].[Date]),TODAY(),QUARTER)>1, CALCULATE( AVERAGE('pricing'[price]), DATEADD('pricing'[date].[Date], 1, QUARTER) ) ,1 ) VAR QuarterChange = AVERAGE('pricing'[price]) - __PREV_QUARTER RETURN IF( __PREV_QUARTER&&__NEXT_QUARTER,IF(QuarterChange>0,"Increase",IF(QuarterChange<0,"Decrease", "No change")), "New win / churn" But the measures cannot be put as Rows header (my speculation is that measures needs the overall input from a table). Can someone suggest what can be done in DAX to categorize the quarterly price change trend? Thanks.767Views0likes1CommentGet related value to the max value of a measure column
Hey there! I'm currently displaying multiple columns, all calculated by measures, in a table visual: Product Name Total Sales Total Sales MoM Total Sessions Total Sessions MoM Product1 3000 50% 200 42% Product2 4500 -6% 200 10% Those measures are stored in a measure table. On a card visual for each MoM column, I want to display the MAX value of these columns and the respective "Product Name" as a description. I already got a solution for showing the maximum number, although I'm not sure if this is the leanest solution: MAXSalesByProductName = MAXX( KEEPFILTERS(VALUES('DimProduct'[Product Name])), CALCULATE('MeasureTable'[Sales_TotalSales MoM%]) ) I can't think of a solution to get the product name, as CALCULATE does not accept measures as filters and the filter function does not accept the MeasureTable as it is empty: First attempt with CALCULATE: VAR __MAX_SALES = 'MeasureTable'[MAXSalesByProductName] RETURN CALCULATE( FIRSTNONBLANK('DimProduct'[Product Name], 'DimProduct'[Product Name]), 'MeasureTable'[Sales_TotalSales MoM%] = __MAX_SALES ) Error: A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed. Second attempt with FILTER: VAR __MAX_SALES = 'MeasureTable'[MAXSalesByProductName] RETURN CALCULATE( FIRSTNONBLANK('DimProduct'[Product Name], 'DimProduct'[Product Name]), FILTER('MeasureTable', __MAX_SALES=[Sales_TotalSales MoM%]) ) Error: Table 'MeasureTable' cannot be used because it does not have any columns. So how to achieve this with this setup?Solved6.6KViews0likes2CommentsMonth over Month Change of a Calculated Measure Gives Wrong Result
Hello, I have measure which is a custom running total of annualized sales (sales are related contracts). By saying custom running total, I mean that I`m excluding any sales amount from running total if a contract is expired for a spesific point of time. This measure is working well without an issue, but now I need calculate month over month % changes of this custom annualized sales running total. I created a MoM% quick measure by using measure I mentioned above, however as you can see in the screenshot below, the MoM% is wrong, and I`m not sure why it`s happening. In case the screenshot is to small to read, please my measure below: Annualized Sales Cumulative (Excluding Expired Contracts) = VAR mindate = MIN ( 'Journal Entries'[Accounting Date].[Date] ) VAR maxdate = MAX ( 'Journal Entries'[Accounting Date].[Date] ) RETURN CALCULATE ( [Annualized Sales Amount], ALLSELECTED ( 'Journal Entries' ), 'Contract Details'[Contract Effective Date] <= maxdate, 'Contract Details'[Contract Expiration Date] >= mindate ) Annualized Sales Cumulative (Excluding Expired Contracts) MoM% = IF( ISFILTERED('Journal Entries'[Accounting 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_MONTH = CALCULATE( [Annualized Sales Cumulative (Excluding Expired Contracts)], DATEADD('Journal Entries'[Accounting Date].[Date], -1, MONTH) ) RETURN DIVIDE( [Annualized Sales Cumulative (Excluding Expired Contracts)] - __PREV_MONTH, __PREV_MONTH ) ) I`d glad if someone can help me to resolve this. Thank you,982Views0likes4CommentsMonthly Report with Last Month's Variance Only
Hello! I'm certain this question has been asked a million times but all of my searching brings up the 1,000's of requests for a simple MoM variance. I've got that part handled. I'd like to show a more streamlined matrix though with several months of data with variance only for the prior 2 months. I'm trying to build a report that looks like this: Here's what I currently get: Is there an "IsFiltered"-type pattern that will let me only show the variance once for the current month and supress it for all prior periods? Alternatively, is there a way to leave the calcs all the same but visually hide the prior month variances? Or, since I'm a finance/Excel "guy", maybe I should be showing this in some other more visual way and simply recreating my Excel Pivot Table in Poewr BI is just plain lazy... Thanks in advance! Here's the DAX: Current month Invoices By Category (w Pmts) = VAR InvoiceAmt = [Total Invoice Amount] + [Total Pmts Revenue] RETURN IF( [BrowseDepth] > [MaxNodeDepth] + 1, BLANK(), IF( [BrowseDepth] = [MaxNodeDepth] + 1, CALCULATE( InvoiceAmt, FILTER( VALUES( Items[IsLeaf] ), Items[IsLeaf] = FALSE ) ), InvoiceAmt ) ) Last Month: Invoices By Category (Last Month) = CALCULATE( [Total Invoices By Category], PREVIOUSMONTH('Calendar'[Date]) ) Variance: MoM Invoice & Pmts Variance = [Invoices By Category (w Pmts)] - [Invoices By Category (Last Month)] - [Pmts Revenue Last Month]Solved4KViews0likes6Comments