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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Need help with formula

Hi,

I am trying to compare each value of col1 and col2 , then display the total count of col1 where the values of col1 is greater than

col2, Kidly help me with the formula for this operation

 

 

Col1Col2    
244.73174.81
157.170
274.21195.87
220.93157.8
95.450
87.4787.47
204.01145.72
328.18126.22
135.9897.13
93.2377.69
209.17130.73
86.5461.81

 

Thanks,

Ravi

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

Hi there, try adding a calcuated measure with the following formula.  I have assumed your table is called Table2 (please change)

 

 

MyMeasure = CALCULATE(
			COUNTROWS('Table2'),
			FILTER(
				'Table2',
				'Table2'[Col1] > 'Table2'[Col2]
				)
			)

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Phil_Seamark
Employee
Employee

Hi there, try adding a calcuated measure with the following formula.  I have assumed your table is called Table2 (please change)

 

 

MyMeasure = CALCULATE(
			COUNTROWS('Table2'),
			FILTER(
				'Table2',
				'Table2'[Col1] > 'Table2'[Col2]
				)
			)

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Thanks Phil, it works!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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