last month
2 TopicsShow cumul only in last month in graph
Good morning, I have the following problem that I cannot resolve. I have this type of chart. I want to display the cumulative value only for the last month. For example, if I select the company B130, I want all the values and display the cumulative total with a point for the month of September. Likewise, if I select company B220, I want to display the cumulative total with a point for the month of August. Here is my DAX formula: Cumul = IF(MONTH(SELECTEDVALUE('Entity (Feuil1)'[Date]))=MONTH(TODAY()) && YEAR(SELECTEDVALUE('Entity (Feuil1)'[Date]))=YEAR(TODAY()), Calculate ( sum('Entity (Feuil1)'[Order]), FILTER( ALLSELECTED('Entity (Feuil1)'[Date]), ISONORAFTER('Entity (Feuil1)'[Date], MAX('Entity (Feuil1)'[Date]), DESC) ) ),BLANK()) My data it this : Entity Date Order B130 30/04/2020 1 B130 12/05/2023 1 B130 22/06/2023 3 B130 12/12/2023 2 B130 01/08/2024 2 B130 14/09/2024 1 B220 01/02/2023 1 B220 04/07/2023 1 B220 05/03/2024 1 B220 11/08/2024 2 B220 02/06/2024 1 Thank you in advance for your helpSolved808Views0likes3CommentsSame period last month filter is not working with period/date/month slicer
Hi, I have to compare the previous month's sales with the current month's sales. I have two formulas: MTD Current month = TOTALMTD([sales],sales_aggregated[Date]) - shows correct number MTD Last Month = CALCULATE( [Sales], DATEADD( FILTER( DATESMTD( sales_aggregated[date]),sales_aggregated[date]<MAX(sales_aggregated[date])),-1,MONTH) ) Shows the Correct number for the previous month. and they both work in the divide formula as well - as a result, they show change %. But I want to select month, and show the "MTD" vs "MTD Prev month", for example if now is 05.2023, I want to select 03.2023 and formula should show 03.2023 and other 02.2023 but as the slicer is filtering the whole table on dates only for 03.2023, 02.2023 is filtered out and MTD Last month is blank. how can i prevent a blank value on the previous month?Solved989Views0likes2Comments