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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
fab196
Helper II
Helper II

comparing two columns


HI ,

CAN anyone help me with this problem

my data is listed below

what i want :

i want table chart result if the column are nt matching then and then the number of rows should be displayed.

for example in my data:

countrystateMg1mg2
inmhpd
in krpp
us mipp
us ca p

for example in my data ,coutry , mg1 and mg is there.if mg1 value <> mg2 then and then result should be shown otherwise not and if tone the mg1 and mg2 feild have null values then this row
should be ignore.

so the final result should be

countrystateMg1mg2
in krpp
us mipp

please help

@parry2k 

@amitchandak 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@fab196 , The result is showing mg1 = mg2 in the output table you shared.

 

Add this measure with other columns

countrows(filter(Table, [Mg1] = [mg2] && not(isblank([Mg1])) && not(isblank([mg2]))))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@fab196 , The result is showing mg1 = mg2 in the output table you shared.

 

Add this measure with other columns

countrows(filter(Table, [Mg1] = [mg2] && not(isblank([Mg1])) && not(isblank([mg2]))))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

THANK YOU GENIOUS!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors