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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Kalaivani
Helper III
Helper III

Measure not giving filtered values after removing a dimension

@PowerBl @powerbi2 

Hi,

I have a problem in ffiltering measure in Power BI. Can anyone help me with this? Thanks in advance!!!

Here is the case:

I have 2 measures that calculates count of the selected Providers from 2 different slicers which gives '1' for the selected providers. Here is the measure -

CountProviderCategory =
VAR selectedproviders = CALCULATETABLE(VALUES('Provider Attributes'[ProviderName]))
RETURN
CALCULATE
(
    COUNTROWS('BarChart'),
    FILTER(
        'BarChart',
        'BarChart'[category] = "Provider" && 'BarChart'[ProviderName] IN selectedProviders
    ),
    TREATAS(VALUES('Provider Attributes'[ProviderName]), 'BarChart'[ProviderName])
)
CountComparisonCategory =
VAR selectedproviders = CALCULATETABLE(VALUES('UnionTable'[Value]))
RETURN
CALCULATE
(
    COUNTROWS('BarChart'),
    FILTER(
        'BarChart',
        'BarChart'[category] = "Comparison" && 'BarChart'[ProviderName] IN selectedProviders
    ),
    TREATAS(VALUES('UnionTable'[Value]), 'BarChart'[ProviderName])
)
CombineData =
IF(
    ([CountComparisonCategory] > 0
    ||
    [CountProviderCategory] > 0),
    "0",
    "1"
)

So I added a table visual like below and filtered the table for the CombineData= 0. My issue is when I remove the diemension from the table, the Visits sum is showing the sum of all dimension values instead of sum of values for the filtered countprovidercategory. 

 

In te table below, the total visits value is 158.  But when I remove the dimension from the table, the sum is the sum of all dimension values which is not right. I want 158 only to be shown there even after removing the Dimension from the table visual. 

 

Table Visual while adding Dimension to the table and after removing it from the table:

categoryCountProviderCategoryCountComparisonCategorySum of TotalVisitsDimension
Comparison 189Val1
Provider1 28Val2
Provider1 26Val3
Provider1 15Val4
Provider1 11Val5
categoryCountProviderCategoryCountComparisonCategorySum of TotalVisits
Comparison 1106761
Provider4 35587
1 REPLY 1
tharunkumarRTK
Super User
Super User

Please provide the pbix file with sample data.

 



Need Power BI consultation, hire me on UpWork .


If the post helps please give a thumbs up



If it solves your issue, please accept it as the solution to help the other members find it more quickly.




Tharun



Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.