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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Chuky01
Helper I
Helper I

Help with Variables in new measure.

I am creating a measure with a few variables, lets call them VAR1, VAR2 and VAR3.  Next I want to count the number of rows of unique values in VAR2 and VAR3 so I used the code - 

 

COUNTROWS( INTERSECT( VAR2, VAR3))

 

Now I want to count the number of rows of unique values in VAR1 that are "Not" in VAR2 and VAR3. How do I go about this?

 

Thanks.

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Chuky01 ,

 

You can use distinct (var a) to find the columns that are not repeated, and then judge with the result of COUNTROWS (INTERSECT( VAR2, VAR3)).


If the problem is still not resolved, please provide data model and the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Henry

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @Chuky01 ,

 

You can use distinct (var a) to find the columns that are not repeated, and then judge with the result of COUNTROWS (INTERSECT( VAR2, VAR3)).


If the problem is still not resolved, please provide data model and the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Henry

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

daxer-almighty
Solution Sage
Solution Sage

That's a question from The Set Theory, isn't it? Say you have 3 sets: A, B and C and you want to calculate A \ (B + C).... So, this is how you go about it 🙂 But maybe you want A \ (B * C)? The English statement above does not let one distinguish easily between those cases...

Helpful resources

Announcements
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!

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.

Top Solution Authors