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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Count Distinct Across Two tables works until I try and add a filter...

Hi

 

I have written a measure which allows me to countdistinct across two tables as follows;

 

JM TEST =
 
COUNTROWS (
    INTERSECT (
        VALUES ( 'Product List'[ProdID]),
        DISTINCT (
            UNION (
                VALUES ( 'Product List'[ProdID ),
                VALUES (Item List [Prod ID] )
            )
           
 
        )
    )
)
 
However, when I try and filter, I get an error message saying Function INTERSET does not support joining a column of type Integer with a column type of Text.
 
Any idea on what is going wrong or how I can add multiple filters to the measure?
 
Thanks
3 REPLIES 3
Dangar332
Super User
Super User

hi, @Anonymous 

hey joseph one of your column (Product List'[ProdID ) or (Item List [Prod ID] ) is text type so check it change it to interger or wholenumber

Anonymous
Not applicable

Hi

 

I have checked and they are text but they need to be text, how would I change this to allow me to filter on text?

hi, @Anonymous 

if you want  in text ffilter then change your Integer column to text

make your both columns ('Product List'[ProdID] ,List [Prod ID] ) to text form

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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