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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Vstukart
New Member

Comparing counts in two columns

I'm trying to compare count in two columns.

Column A is guaranteed to have a value in it that is bigger or equal to 1, whereas column B doesn't necessarily have any value in it (seems to return blank when 0). I would like to be able to flag all rows where Column A doesn't match Column B.

 

Can anyone please help me out on how to do this and not get errors for the blank cells?

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @Vstukart ,

Please have a try.

Create measures.

 

count number = COUNT('Table'[Number Check])
count service = COUNT('Table'[SERVICEJOBID])
Measure = IF([count number]>=1&&[count service]<>0,BLANK(),"MARK")

 

11.PNG22.PNG

 

 

 

 

 

 

Best Regards

Community Support Team _ Polly

 

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

3 REPLIES 3
v-rongtiep-msft
Community Support
Community Support

Hi @Vstukart ,

Please have a try.

Create measures.

 

count number = COUNT('Table'[Number Check])
count service = COUNT('Table'[SERVICEJOBID])
Measure = IF([count number]>=1&&[count service]<>0,BLANK(),"MARK")

 

11.PNG22.PNG

 

 

 

 

 

 

Best Regards

Community Support Team _ Polly

 

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

Vstukart
New Member

@amitchandak  please see below:

 

Vstukart_3-1639524220167.png

 

 

Vstukart_2-1639524195981.png

 

Vstukart_1-1639524169121.png

amitchandak
Super User
Super User

@Vstukart , Can you share sample data and sample output in table format?

 

Example column

if([columnA] > coalesce([Columnb],0) , true(), false())

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.