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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

count rows

Dear Friends

i have table with thousands of rows as shown:

intial.JPG

 i need to count the number of "MR Number" wherer MR number contains only Status = "Initial", for example in above MR 1322398 & 1321621 have only status ="Initial", so that MR number Count=2

how can i do this by dax measure for all rows

 

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a new measure like

 


countx(filter(summarize(Table, Table[MR Number], "_cnt", count(Table[MR Number]), "_init", countx(filter(Table, Table[Status] = "Initial"),Table[MR Number])), [_cnt] =[_init]),[MR Number])

View solution in original post

6 REPLIES 6
smpa01
Super User
Super User

@Anonymous 

Measure =
CALCULATE (
    COUNT ( tbl[Status] ),
    FILTER ( VALUES ( tbl[Status] ), tbl[Status] = "INITIAL" )
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
mh2587
Super User
Super User

a=Calculate(count([MR Number]),Filter(TableName,TableName[Status] = "Initial"))


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Pragati11
Super User
Super User

HI @Anonymous ,

 

You can simply create a measure:

 

newCacl =
CALCULATE (
    DISTINCTCOUNT ( yourTablname[MR Number] ),
    yourTablname[Status] = "INITIAL"
)

 

In the above DAX just replace with your table name and column names.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@Pragati11  in reponse to the previous

 

smpa01_0-1640094523643.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Hi @smpa01 ,

 

I think you updated you response from the initial one. This will definitely work.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

amitchandak
Super User
Super User

@Anonymous , Try a new measure like

 


countx(filter(summarize(Table, Table[MR Number], "_cnt", count(Table[MR Number]), "_init", countx(filter(Table, Table[Status] = "Initial"),Table[MR Number])), [_cnt] =[_init]),[MR Number])

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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