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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Arunravi0001
Frequent Visitor

Need Help

Hi Everyone ! 
                               I'm seeking for solution for below scenario

Arunravi0001_0-1696410127264.png

i have table like this
 Requirement :Find out Count of "Positive"  Word Occurrence in Above table based on ID column  

I Tried that using below DAX ,but it is not working 
Result =
var Table A = 
    summarize( Table name , ID,"Occurrence",
                                                                      if (Result[Type]="Positive", Count( [Type]),0)
                      )

return 
       countx=(Table A , "Occurrence")

Anyone please help me 



1 ACCEPTED SOLUTION

Hi @Arunravi0001 check new version below.

Test count =
IF (
    Sheet1[Type] = "Positive",
    CALCULATE (
        COUNTAX ( FILTER ( Sheet1, Sheet1[Type] = "Positive" ), Sheet1[Type] ),
        ALLEXCEPT ( Sheet1, Sheet1[ID] )
    ),0
)

some_bih_0-1696427776226.png

Did I answer your question? Kudos appreciated / accept solution!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

7 REPLIES 7
some_bih
Super User
Super User

Hi @Arunravi0001 possible solution as following calculated column

Test count =
IF (
    Sheet1[Type] = "Positive",
    CALCULATE (
        COUNTAX ( FILTER ( Sheet1, Sheet1[Type] = "Positive" ), Sheet1[Type] ),
        ALLEXCEPT ( Sheet1, Sheet1[ID] )
    )
)
 

Did I answer your question? Kudos appreciated / accept solution

 

 

some_bih_0-1696414037293.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Hi @some_bih , Thanks for  Your reply 

Need Column be like , based on id , the "positive " word count 

Arunravi0001_0-1696415772659.png

 

Thanks for this @some_bih 🙂

Hi @Arunravi0001 

If this is solutin, accept so other member of community could use it. Thx





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Hi @Arunravi0001 please describe which criterias should be matched to get the figures as your overview- first occurance of Sample ID and Type is "Positive" or ...what about Sample3  and value 0?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






hi @some_bih yes ,Sample ID and Type is "Positive" , should be counting  , if Negative Returns "0"

Hi @Arunravi0001 check new version below.

Test count =
IF (
    Sheet1[Type] = "Positive",
    CALCULATE (
        COUNTAX ( FILTER ( Sheet1, Sheet1[Type] = "Positive" ), Sheet1[Type] ),
        ALLEXCEPT ( Sheet1, Sheet1[ID] )
    ),0
)

some_bih_0-1696427776226.png

Did I answer your question? Kudos appreciated / accept solution!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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