Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Wendeley-North
Resolver I
Resolver I

Slicer for Between Dates Not Working

Hi, I'm having an issue where the slicer filters the underlying data, but not the matrix itself:

Wendeley-North_0-1622168398414.png

We see that the values are calculated for Q4 2020 - Q2 2021, but the remaining quarters should not even be appearing due to the date range selected by the slicer.

This feels like it should be a rather intuitive feature to use, so I'm not sure what is happening here, and it can be frustrating.

Matrix Settings

Wendeley-North_1-1622168554035.png

Sample Data

DateParentGroupGroupSlicerGroup1ReturnReturnsNorm
31-Jan-20PG_1PG1_G1SG1_10.10%100.10%
31-Jan-20PG_1PG1_G2SG1_1-0.12%99.88%
28-Feb-20PG_1PG1_G1SG1_10.03%100.03%
28-Feb-20PG_1PG1_G2SG1_10.67%100.67%
31-Mar-20PG_1PG1_G1SG1_10.48%100.48%
31-Mar-20PG_1PG1_G2SG1_1-0.55%99.45%
30-Apr-20PG_1PG1_G1SG1_1-0.13%99.87%
30-Apr-20PG_1PG1_G2SG1_1-0.34%99.66%
29-May-20PG_1PG1_G1SG1_10.00%100.00%
29-May-20PG_1PG1_G2SG1_10.28%100.28%
30-Jun-20PG_1PG1_G1SG1_10.34%100.34%
30-Jun-20PG_1PG1_G2SG1_1-0.40%99.60%
31-Jul-20PG_1PG1_G1SG1_1-0.65%99.35%
31-Jul-20PG_1PG1_G2SG1_10.76%100.76%
31-Aug-20PG_1PG1_G1SG1_1-0.33%99.67%
31-Aug-20PG_1PG1_G2SG1_1-0.04%99.96%
30-Sep-20PG_1PG1_G1SG1_10.12%100.12%
30-Sep-20PG_1PG1_G2SG1_1-0.56%99.44%
30-Oct-20PG_1PG1_G1SG1_1-0.20%99.80%
30-Oct-20PG_1PG1_G2SG1_1-0.06%99.94%
30-Nov-20PG_1PG1_G1SG1_1-0.22%99.78%
30-Nov-20PG_1PG1_G2SG1_1-0.20%99.80%
31-Dec-20PG_1PG1_G1SG1_10.34%100.34%
31-Dec-20PG_1PG1_G2SG1_1-0.74%99.26%
29-Jan-21PG_1PG1_G1SG1_10.02%100.02%
29-Jan-21PG_1PG1_G2SG1_10.03%100.03%
26-Feb-21PG_1PG1_G1SG1_1-0.59%99.41%
26-Feb-21PG_1PG1_G2SG1_10.35%100.35%
31-Mar-21PG_1PG1_G1SG1_1-0.02%99.98%
31-Mar-21PG_1PG1_G2SG1_1-0.30%99.70%
30-Apr-21PG_1PG1_G1SG1_1-0.28%99.72%
30-Apr-21PG_1PG1_G2SG1_1-0.24%99.76%
30-Apr-21PG_2PG2_G2SG1_1-0.10%99.90%
31-Mar-21PG_2PG2_G2SG1_10.52%100.52%
26-Feb-21PG_2PG2_G2SG1_1-0.56%99.44%
29-Jan-21PG_2PG2_G2SG1_10.20%100.20%
31-Dec-20PG_2PG2_G2SG1_10.38%100.38%
30-Nov-20PG_2PG2_G2SG1_10.16%100.16%
30-Oct-20PG_2PG2_G2SG1_10.07%100.07%
30-Sep-20PG_2PG2_G2SG1_10.09%100.09%
31-Aug-20PG_2PG2_G2SG1_1-0.53%99.47%
31-Jul-20PG_2PG2_G2SG1_10.69%100.69%
30-Jun-20PG_2PG2_G2SG1_1-0.21%99.79%
29-May-20PG_2PG2_G2SG1_10.08%100.08%
30-Apr-20PG_2PG2_G2SG1_1-0.58%99.42%
31-Mar-20PG_2PG2_G2SG1_10.85%100.85%
28-Feb-20PG_2PG2_G2SG1_10.11%100.11%
31-Jan-20PG_2PG2_G2SG1_10.28%100.28%
30-Apr-21PG_2PG2_G1SG1_1-0.30%99.70%
31-Mar-21PG_2PG2_G1SG1_1-0.31%99.69%
26-Feb-21PG_2PG2_G1SG1_1-0.69%99.31%
29-Jan-21PG_2PG2_G1SG1_10.48%100.48%
31-Dec-20PG_2PG2_G1SG1_10.12%100.12%
30-Nov-20PG_2PG2_G1SG1_10.77%100.77%
30-Oct-20PG_2PG2_G1SG1_10.02%100.02%
30-Sep-20PG_2PG2_G1SG1_1-0.20%99.80%
31-Aug-20PG_2PG2_G1SG1_1-0.15%99.85%
31-Jul-20PG_2PG2_G1SG1_1-0.39%99.61%
30-Jun-20PG_2PG2_G1SG1_1-0.21%99.79%
29-May-20PG_2PG2_G1SG1_1-0.71%99.29%
30-Apr-20PG_2PG2_G1SG1_10.20%100.20%
31-Mar-20PG_2PG2_G1SG1_1-0.50%99.50%
28-Feb-20PG_2PG2_G1SG1_10.84%100.84%
31-Jan-20PG_2PG2_G1SG1_10.14%100.14%

Measure Used

 

CumProd = PRODUCTX( TableFR, TableFR[ReturnsNorm] ) - 1

 

Appreciate any help, thanks.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Wendeley-North , Try like

CumProd = var _1= PRODUCTX( TableFR, TableFR[ReturnsNorm] ) return CALCULATE(if(not(ISBLANK(_1)) , _1-1, blank()))

 

 

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Wendeley-North , Try like

CumProd = var _1= PRODUCTX( TableFR, TableFR[ReturnsNorm] ) return CALCULATE(if(not(ISBLANK(_1)) , _1-1, blank()))

 

 

 

Hi, that does solve the issue though not the slicer behaviour... will accept it. Many thanks.

Final code used

Period_GeoMean_Ret = 
VAR result = PRODUCTX ( TableFR, TableFR[ReturnsNorm] )
RETURN
    IF ( ISBLANK(result), BLANK(), result - 1 )

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.