Forum Discussion
Dynamically Changes affect the Matrix columns
- Anonymous2 years ago
Hi,jismongeorge63 .Hello,amitchandak ,
thanks for your concern about this issue.
Your answer is excellent!
And I would like to share some additional solutions below.
I am glad to help you.According to your description, you want to select a month through the slicer, and display the data of the previous three months in visual without that month.
If I understand you correctly, you can refer to the following test I did below
This is my test data
I constructed a date table, Dates, to use as a slicer (which has nothing to do with the table:"case03")
I have created a measure, which marks out the dates that are in the first three months of the month selected by the slicer (excluding the month selected by the slicer), and marks it as 1 if it is satisfied, and 0 otherwise.
M_result = VAR dateValues=MAX('Dates'[Date_]) VAR previousThreeMonthStart=EOMONTH(dateValues,-4)+1 VAR previousThreeMonthEnd=EOMONTH(dateValues,-1) RETURN IF(MAX('case03'[Date])>=previousThreeMonthStart&&MAX('case03'[Date])<=previousThreeMonthEnd,1,0)Modify the filter criteria in the Filters field: when filtering by M_result, only data with M_result of 1 will be filtered.
like this.
If you want to include the selected month, you can use the following measure: M_includeSelected
M_includeSelected = VAR dateValues=MAX('Dates'[Date_]) VAR previousThreeMonthStart=EOMONTH(dateValues,-4)+1 RETURN IF(MAX('case03'[Date])>=previousThreeMonthStart&&MAX('case03'[Date])<dateValues,1,0)like this:
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date])) //Current Month
Rolling 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],eomonth( MAX('Date'[Date]), -1) ,-3,MONTH))
CUstomer Active in current not in last three
counts(Values(Customer[Customer]), if(not(isblank([MTD Sales])) && isblank([Rolling 3]) , [Customer], Blank() ) )
Similar to
Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529
Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retention/ba-p/1377458
Customer Retention Part 5: LTD Vs Period Retention
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-5-LTD-and-PeriodYoY-Retention-is-only/ba-p/2114497
- jismongeorge632 years agoNew Member
Name, date and sales are the columns in data
- jismongeorge632 years agoNew Member
If user click the one month in sliver, the columns in Matrix shows previous 3 month. For example, for April , shows March,Feb , Jan . for may , apr,March,Feb etc..