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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
mzs1988
Frequent Visitor

Table visual not considering Measure filters

HI , 

 

I'm facing a little issue with the Table visual in Power BI deskop.  

I have a small dataset.  In that dataset I have a group of Items ( lets say ATMs ) and thier transaction completion time. 

 

I'm have calculated the average of all ATMs regardless of anything except date period that I selected in a slicer , below is my measure : 

 

 

Average = CALCULATE(AVERAGE(Query1[completion_time]) , ALLEXCEPT(Query1 , Query1[dt]))

 

 

 

 

to display the results of the average next to each machine I list the machine Ids and the average in a table visual. 

Up untill this point everything seems to be correct and working fine.  and the data is shown as expected. 

 

Now when I use another visual ( lets say a map visual ) to select which recods appear in the table.  the results becomes unexpected. and the average value changes. Even though I have explictly spesificed in the average measure to exclude any filter except dates.  since the date period is not changed the result should always be the same.  

 

I tried to check the issue with Dax studio and found

 

 

 

DEFINE
  VAR __DS0FilterTable = 
    FILTER(
      KEEPFILTERS(VALUES('Query1'[device_id])),
      NOT('Query1'[device_id] IN {"832",
        "832",
        "832"})
    )

  VAR __DS0FilterTable2 = 
    FILTER(
      KEEPFILTERS(VALUES('Query1'[dt])),
      AND('Query1'[dt] >= DATE(2022, 2, 13), 'Query1'[dt] < DATE(2023, 2, 2))
    )

  VAR __DS0Core = 
    SUMMARIZECOLUMNS(
      'Query1'[device_id],
      __DS0FilterTable,
      __DS0FilterTable2,
      "Average", 'Query1'[Average]
    )


evaluate __DS0Core

 

 

 

 

The above is the Dax used by the table visual if I do not select anything in the maps visual. and thus shows the correct results 

 

But once I introduce the anothe visual to select records the calculation becomes wrong . below is the code generated from the table visual after I use the map as a slicer : 

 

 

DEFINE
  VAR __DS0FilterTable = 
    FILTER(
      KEEPFILTERS(VALUES('Query1'[device_id])),
      NOT('Query1'[device_id] IN {"832",
        "832",
        "832"})
    )

  VAR __DS0FilterTable2 = 
    FILTER(
      KEEPFILTERS(VALUES('Query1'[dt])),
      AND('Query1'[dt] >= DATE(2022, 2, 13), 'Query1'[dt] < DATE(2023, 2, 2))
    )

  VAR __DS0FilterTable3 = 
    TREATAS({(40.21218, 74.554319)}, 'Query2'[lat], 'Query2'[longi])

  VAR __DS0Core = 
    SUMMARIZECOLUMNS(
      'Query1'[device_id],
      __DS0FilterTable,
      __DS0FilterTable2,
      __DS0FilterTable3,
      "Average", 'Query1'[Average]
    )


evaluate __DS0Core

 

 

 

 

I under stand that the issue is from the filter : 

 

 

  VAR __DS0FilterTable3 = 
    TREATAS({(40.21218, 74.554319)}, 'Query2'[lat], 'Query2'[longi])

 

 

 

But I do not understand that is this affecting the average measure calculation even though in the average measure I exclude all filters manually except for date. 

 

 

1 REPLY 1
mzs1988
Frequent Visitor

One thing that I forgot to mention is that   I' using two tables  Query2 and Query1   in the two visuals with a proper relationship.   

 

As it turns out If I merge that two into a single table the whole thing works fine. I'm not sure why. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.