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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
Community Champion
Community Champion

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.