Forum Discussion

mp390988's avatar
mp390988
Icon for Post Partisan rankPost Partisan
1 year ago
Solved

Date parameters are not filtering report

Hi,   I have a paginated report where I have From and To dates set as parameters which come from the Calendar table. Then I have my main report which contains a TradeDate field coming from my fact...
  • jaineshp's avatar
    1 year ago

    Hey mp390988,

    Looking at your DAX query, I can see the issue. You're filtering on 'Calendar'[Date] but displaying 'TradesPlus'[TradeDate] - these are two different fields, and the relationship between them might not be working as expected in this context.

    Solution Steps:

    1. Direct Filter Approach Replace your current filter conditions with:

     

    EVALUATE
    CALCULATETABLE(
    SUMMARIZECOLUMNS(
    'TradesPlus'[TradeDate],
    'TradesPlus'[ClientID],
    'TradesPlus'[ClientName],
    'TradesPlus'[BuyCCY],
    'TradesPlus'[BuyAmount],
    'TradesPlus'[SellCCY],
    'TradesPlus'[SellAmount],
    'TradesPlus'[GBPVolume],
    'TradesPlus'[GBPRevenue]
    ),
    'TradesPlus'[TradeDate] >= DATEVALUE(@FromCalendarDate),
    'TradesPlus'[TradeDate] <= DATEVALUE(@ToCalendarDate)
    )

     

    2. Alternative Using FILTER Function If you need to maintain the Calendar table relationship:

     

    EVALUATE
    FILTER(
    SUMMARIZECOLUMNS(
    'TradesPlus'[TradeDate],
    'TradesPlus'[ClientID],
    'TradesPlus'[ClientName],
    'TradesPlus'[BuyCCY],
    'TradesPlus'[BuyAmount],
    'TradesPlus'[SellCCY],
    'TradesPlus'[SellAmount],
    'TradesPlus'[GBPVolume],
    'TradesPlus'[GBPRevenue]
    ),
    'TradesPlus'[TradeDate] >= DATEVALUE(@FromCalendarDate) &&
    'TradesPlus'[TradeDate] <= DATEVALUE(@ToCalendarDate)
    )

     

    3. Parameter Verification

    • Check if your parameters are passing correct date values
    • Verify the date format matches your regional settings
    • Test with hardcoded dates first to isolate the issue

    4. Relationship Check

    • Confirm the relationship between Calendar and TradesPlus tables is active
    • Ensure both date fields have the same data type
    • Check if there are any inactive relationships affecting the filter context

    The key issue is that SUMMARIZECOLUMNS with external filters on related tables can sometimes behave unexpectedly. Filtering directly on the fact table date field should resolve your problem.

     

    Fixed? ✓ Mark it • Share it • Help others!


    Best Regards,
    Jainesh Poojara | Power BI Developer