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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
spereira
Frequent Visitor

Excel query to DAX

What is the equivalent dax for the following query?

 

(COUNTIF($B$1:$B1,$B1)=1)+0  

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

Hi @spereira

 

Using a measure as below:

 

 

Measure = 
VAR a=CALCULATE(COUNT('Table'[B]),FILTER('Table','Table'[B]="$B1")))
Return
IF(a=1,a+0,BLANK())

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi @spereira

 

Using a measure as below:

 

 

Measure = 
VAR a=CALCULATE(COUNT('Table'[B]),FILTER('Table','Table'[B]="$B1")))
Return
IF(a=1,a+0,BLANK())

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
amitchandak
Super User
Super User

countx(filter(table,table[Column]="abc"),table[column])

countx(filter(table,table[Column]=table[column2]),table[column])

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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