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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Count if Dax

Hi There,

 

I am facing an issue in replicating Countif of Excel in DAX,

I have two tables. In my Sheet 1 table, the SF Req ID column contains no of position. If a position has recevied more than 1 cv recevied then their SF ID would appear more than once in this column.

In my Referral Tracker table, the Taleo ID column lists all SF ID in the system. 

 

What I want to do is set up a new column in the Referral Tracker table that counts the number of times a SF ID appears in the Sheet 1 table if it matches the Taleo ID of Referral Tracker.

 

If I were to do this in Excel, I would create a column on my refrral tracker table and each cell would have the formula: =COUNTIF('Sheet 1'!B$1:B$10,D9)

 

I tried to create a Dax forumla however i am getting below error :

 

ashishkr14_1-1647234973227.png

 

 

I need to figure out why i am not getting my comparing table name in my DAX.

Request you to please help or let me know any other alternative solution for this.

 

Regards,

Ashish

1 ACCEPTED SOLUTION

@Anonymous , if you are creating a measure and if you try to compare column from two tables infilter , it needs to be like

 

Filter(Sheet1,Sheet1[SF Req Id]=Max('Referral Tracker'[Taleo Req ID]) )

 

if you want work on a column

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @amitchandak ,

 

Thank you for your quick response. It solved my issue.

 

Regards,

Ashish

Anonymous
Not applicable

Please Wrap the taleo word with (") ex:- "taleo"

Anonymous
Not applicable

Hi @Anonymous 

 

"Taleo" is the column name which is appearing in "referral table" however i want to  writing my DAX like Sheet1(SF Req Id)=Referral Tracker(Taleo Req ID) but Its not picking my Referral table.

@Anonymous , if you are creating a measure and if you try to compare column from two tables infilter , it needs to be like

 

Filter(Sheet1,Sheet1[SF Req Id]=Max('Referral Tracker'[Taleo Req ID]) )

 

if you want work on a column

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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