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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply

Dax help

Hi All,

 

I need small help in Dax please.. How do I rewrite this dax in correct way.. pls guide..

tpa removal rows = CALCULATE(COUNT('table1'[ID]),
FILTER('table1','table1'[Name]<>"*tpa*"),
FILTER('table1','table1'[Name]<>"tpa"),
FILTER('table1','table1'[Name]<>"*tpa"),
FILTER('table1','table1'[Name]<>"tpa*")
)

  

3 ACCEPTED SOLUTIONS

@Greg_Deckler @parry2k 

No I didnt undestand.. See this is how I used..

tpa removal rows = 
VAR __Result = CALCULATE ( COUNTROWS( 'table1' ), NOT 'table1'[Name] IN {"*tpa*", "tpa", "*tpa", "tpa*" } )
RETURN
  __Result

View solution in original post

Did I used it correctly? Pls let me know, since I dont understand the syntax.. after countrows do I use table name or column name?

tpa removal rows = 
VAR __Result = CALCULATE ( COUNTROWS( 'table1' ), NOT 'table1'[Name] IN {"*tpa*", "tpa", "*tpa", "tpa*" } )
RETURN
  __Result

View solution in original post

ThxAlot
Super User
Super User

 

= CALCULATE( COUNTROWS( Table1 ), NOT CONTAINSSTRING( Table1[Name], "tpa" ) )

 



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

9 REPLIES 9
ThxAlot
Super User
Super User

 

= CALCULATE( COUNTROWS( Table1 ), NOT CONTAINSSTRING( Table1[Name], "tpa" ) )

 



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



parry2k
Super User
Super User

@PowerBIBeginer table name



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@PowerBIBeginer I think it is worth asking what you are trying to achieve. Share sample data with the expected output. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@PowerBIBeginer 

 

let's use the Name column in the table visual and then above measure, it will remove TPA rows.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@Greg_Deckler @parry2k 

No I didnt undestand.. See this is how I used..

tpa removal rows = 
VAR __Result = CALCULATE ( COUNTROWS( 'table1' ), NOT 'table1'[Name] IN {"*tpa*", "tpa", "*tpa", "tpa*" } )
RETURN
  __Result

Did I used it correctly? Pls let me know, since I dont understand the syntax.. after countrows do I use table name or column name?

tpa removal rows = 
VAR __Result = CALCULATE ( COUNTROWS( 'table1' ), NOT 'table1'[Name] IN {"*tpa*", "tpa", "*tpa", "tpa*" } )
RETURN
  __Result

Hi Greg, Hi Perry,

 

Thanks for such a quick and pretty soluton. But I dont understand 

RETURN __Result

return __result is what? means in my case what will be there? 

parry2k
Super User
Super User

@PowerBIBeginer or something like this:

 

tpa removal rows = 
VAR __Result = CALCULATE ( COUNTROWS( __Table ), NOT 'table1'[Name] IN {"*tpa*", "tpa", "*tpa", "tpa*" } )
RETURN
  __Result


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Greg_Deckler
Community Champion
Community Champion

@PowerBIBeginer You could do this:

 

tpa removal rows = 
  VAR __Table = 
    FILTER( 
      'table1',
      'table1'[Name]<>"*tpa*" && 
      'table1'[Name]<>"tpa" &&
      'table1'[Name]<>"*tpa" &&
      'table1'[Name]<>"tpa*"
    )
  VAR __Result = COUNTROWS( __Table )
RETURN
  __Result

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors