rolling 6 months data
2 TopicsNeed to create DAX for last 3 month visible in clustered column chart
Hi Experts, I want to create a dax to display the last 3 months when we select any month from the slicer. if not selected then it will display all month data in clustered column chart. Monthname is a slicer (MonthName = FORMAT([Date],"MMMM")) //text type Monthyear is a X axis in visual (MonthYear = FORMAT([Date], "MMM-yyyy")) //text type Tried this measure but no luck: Last3Months = VAR HasMonthSelected = ISFILTERED ( 'CustomCalendar'[MonthName] ) VAR EndDate = CALCULATE ( MAX ( 'CustomCalendar'[Date] ), ALLSELECTED ( 'CustomCalendar' ) ) VAR SelectedDate = MAX ( 'CustomCalendar'[Date] ) VAR Result = SWITCH ( TRUE (), HasMonthSelected && SelectedDate IN DATESINPERIOD ( 'CustomCalendar'[Date], EndDate, -3, MONTH ), 1, HasMonthSelected, 0, 1 ) RETURN Result Please help me on this. Thanks DKSolved1.4KViews0likes8CommentsNeed to display rolling 6 months data in each month bar.
Hi There, I have learnt a lot from the community. Thanks for that first. This is my first post & I have a query. I have a bar chart which displays each month total. [Count of users] My date filters are from the same table (its a Date Range with slider). I need to show rolling 6 months data in each month bar. Eg. If i select a date range in the filter (01-01-2021 to 30-06-2021) the following is expected June 2021 bar should display Jan 2021 to May 2021 aggreagate data , and May 2021 data bar should display December 2020 to April 2021 show aggreagate data and so on. Every month bar should have the previous 6 months data in it. I have tried writing a measure as follows 010 Moving Month = IFERROR(CALCULATE(DISTINCTCOUNTNOBLANK(Append2[USER_EMAIL]),DATESINPERIOD(Append2[Date(Key1)].[Date],LASTDATE(Append2[Date(Key1)].[Date]),-6,MONTH))+0,0) When i add this measure to the column value it displays zero. If i display this measure in a card and use the date filter as dropdown and select particular month and year this displays the last 6 months values from June 2021 Thanks in advance. Note: I am a beginner 🙂Solved3.9KViews0likes2Comments