cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
titusissam Frequent Visitor
Frequent Visitor

Countif as same as Countif($A2:A450,A450) in Power BI

Can someone help in acheiving below count in Power BI.

 

NameCount
A1
B1
C1
D1
A2
A3
A4
B2
B3
C2
D2
2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Countif as same as Countif($A2:A450,A450) in Power BI

@titusissam try following measure

 

Count = 
CALCULATE( COUNTROWS( Table1 ),
FILTER( ALLEXCEPT( Table1, Table1[Name] ),
Table1[Index] <= MAX( Table1[Index] ) ) )




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

Proud to be a Datanaut! Kudos Help Smiley Happy
Connect with me on Linkedin. Feel free to email me with any of your BI needs.




 




Super User
Super User

Re: Countif as same as Countif($A2:A450,A450) in Power BI

@titusissam did you tested the measure I sent to you. i tested at my end it works

 

image.png





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

Proud to be a Datanaut! Kudos Help Smiley Happy
Connect with me on Linkedin. Feel free to email me with any of your BI needs.




 




7 REPLIES 7
Super User
Super User

Re: Countif as same as Countif($A2:A450,A450) in Power BI

@titusissam you need to have some sort of index or date to calculate running total. What other columns you have in model?





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

Proud to be a Datanaut! Kudos Help Smiley Happy
Connect with me on Linkedin. Feel free to email me with any of your BI needs.




 




Super User
Super User

Re: Countif as same as Countif($A2:A450,A450) in Power BI

@titusissam you need to have date or index column in your model to calculate running total.





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

Proud to be a Datanaut! Kudos Help Smiley Happy
Connect with me on Linkedin. Feel free to email me with any of your BI needs.




 




titusissam Frequent Visitor
Frequent Visitor

Re: Countif as same as Countif($A2:A450,A450) in Power BI

Thanks for your reply @parry2k 

 

yes i do have an index column which has row number in it.

Super User
Super User

Re: Countif as same as Countif($A2:A450,A450) in Power BI

@titusissam try following measure

 

Count = 
CALCULATE( COUNTROWS( Table1 ),
FILTER( ALLEXCEPT( Table1, Table1[Name] ),
Table1[Index] <= MAX( Table1[Index] ) ) )




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

Proud to be a Datanaut! Kudos Help Smiley Happy
Connect with me on Linkedin. Feel free to email me with any of your BI needs.




 




titusissam Frequent Visitor
Frequent Visitor

Re: Countif as same as Countif($A2:A450,A450) in Power BI

yea i got this answer based on an earlier post, but i want the occurance number.

 

Eg., If "A" repeats 10 times count column should have 1,2,3, etc.,

 

Thanks again for your help on this.. Smiley Happy

 

Current output:

 

samplepic.JPG

Super User
Super User

Re: Countif as same as Countif($A2:A450,A450) in Power BI

@titusissam did you tested the measure I sent to you. i tested at my end it works

 

image.png





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

Proud to be a Datanaut! Kudos Help Smiley Happy
Connect with me on Linkedin. Feel free to email me with any of your BI needs.




 




titusissam Frequent Visitor
Frequent Visitor

Re: Countif as same as Countif($A2:A450,A450) in Power BI

yea working fine in measure.. thank u.... Smiley Happy Smiley Happy