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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.