slicer selection
2 TopicsShow last N months based on FiscalYearMonth slicer selection without calendar/date table
My requirement Ex-1 When the user select a value say 202501 from slicer "FiscalYearPeriodCd" which is a text data type. The table below should display last 13 months . Ie from 202401 to 202501. ---Last 13 months Ex-2 When the user selects "202411" , the table below should display SalesUSD from 202311 to 202411 .---Last 13 months. .Unfortunately i have a calendar table but the calendar table and fact table are related using someother key and not a datekey as per the business requirement and hence i cannot change it.Also in my date table , i have the date repeated twice.One is for US and another for Non US due to fiscal calculation.Hence i cannot use datesinperiod , dateadd or other date related functions.Hence the only option is to use FiscalYearPeriodCd. Raw data below SalesUSD FiscalYearPeriodCd 534132759.5 202201 1557801979 202202 695221259.1 202203 813135024.7 202204 832097591.8 202205 755491149.2 202206 848978369.6 202207 831567295.5 202208 907314200.6 202209 822103615.4 202210 674213875.8 202211 -2879970782 202212 859510773.8 202301 908174754.8 202302 856401757.6 202303 864263784 202304 880142006.9 202305 861088774.2 202306 -2353615032 202307 968984985.4 202308 -1857687494 202309 868514132.3 202310 -66961618.2 202311 1317854317 202312 1060522633 202401 1011795775 202402 829441979.7 202403 1100402094 202404 1064195484 202405 1138271467 202406 1898901.5 202407 754629775 202408 130722055.9 202409 1437834704 202410 912161100.4 202411 167628959.9 202412 486353211.6 202501 98759203.23 202502 Expected output for Ex 1 slicerselection = 202501 MgmtRateUSD FiscalYearPeriodCd 1060522633 202401 1011795775 202402 829441979.7 202403 1100402094 202404 1064195484 202405 1138271467 202406 1898901.5 202407 754629775 202408 130722055.9 202409 1437834704 202410 912161100.4 202411 167628959.9 202412 486353211.6 202501 expected output for ex 2 - slicerselection = 202411 MgmtRateUSD FiscalYearPeriodCd -66961618.2 202311 1317854317 202312 1060522633 202401 1011795775 202402 829441979.7 202403 1100402094 202404 1064195484 202405 1138271467 202406 1898901.5 202407 754629775 202408 130722055.9 202409 1437834704 202410 912161100.4 202411 Thank you so much in advance.Solved752Views0likes3CommentsRolling 4 Quarters Based on Slicer Selection
Hi everyone, I've been stuggling to figure out a solution and hoping that someone in this community could point me in the right direction. End Goal: Table/Matrix the displays only data for Last 4 Quarters based on slicer selection I found the following post here, and was able to implement for my situation and it is mostly working: link Summary: use a disconnected date table and a flag measure to flag the last four quarters. Then, use a visual level filter and the flag measure to filter for only for quarters with "Y" as these are the last four quarters Here is the measure I'm using to flag the last 4 quarters: R4 Quarter Flag = VAR _max = SELECTEDVALUE ( 'Date Copy'[Quarter Index] ) VAR _min = CALCULATE ( MAX ( 'Date Copy'[Quarter Index] ), FILTER ( ALL ( 'Date Copy' ), 'Date Copy'[Quarter Index] = SELECTEDVALUE ( 'Date Copy'[Quarter Index] ) - 3 ) ) VAR TimeFrame = MAX ('Date'[Quarter Index]) RETURN IF ( TimeFrame <= _max && TimeFrame >= _min, "Y", "N" ) Issue: This approach doesn't seem to work when there are rows added to the matrix from other tables - ie a location table. See attached pbi file for example of the issue: pbi example - google drive The first matrix shows the R4 quarters, which is how this should work The second matrix includes the location code, which causes the R4 quarter flag filter to no longer work I imagine that there is something in the DAX of the R4 quarter flag that is cuasing the rows to override the column filter, however, I am not able to figure out what is causing this It would be so appreciated if anyone is able to provide any suggestions how to make this work when there is row data as well. Thank you in advance for your help!2KViews0likes6Comments