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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mp390988
Helper V
Helper V

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 table.

My datasource is a semantic model where I can see the date field from my Calendar table is connected to the TradeDate field in my fact table via a 1-to-many relationship.

 

This is the dax I have in my paginated report:

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

But when I run my paginated report, I still see records where the TradeDate field from my fact table does not adhre to the from and start date i chose. For example, From Date = 01/04/2025 and End Date = 01/08/2025 but am seeing records where TradeDate = 01/03/2025 which falls outside of the date range.

Anyone have a clue what is going on here?

 

Thank You

1 ACCEPTED SOLUTION
jaineshp
Memorable Member
Memorable Member

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

View solution in original post

2 REPLIES 2
mp390988
Helper V
Helper V

HI @jaineshp ,

Thank you for your reply.

It worked with option 1 Direct Filter Approach.
Actually, I had thought of this solution as well but was (and still) getting the below error message and therefore I used to click cancel and not happen to get round to actually testing to see if it works.

mp390988_0-1754917822597.png

 




Thank Yoiu

jaineshp
Memorable Member
Memorable Member

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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