Forum Discussion

ashik1992's avatar
ashik1992
Icon for Helper I rankHelper I
5 years ago
Solved

Count of values

Hi,

Thanks for the tips everyone.

I have one  doubt. i want to find the counts of status of projects from my table . table is like  this .

ProjectsProposal Status
p1Accepted
p2Accepted
p3Accepted
p4Accepted
p5Accepted
p6Accepted
p7Accepted
p8OnHold
p9Rejected
p10Accepted
p11Not Proposing
p12Accepted
p13Accepted
p14Accepted
p15Accepted
p16Accepted
p17Accepted
p18Accepted
p19Accepted
p20Accepted
p21Lost
p22null
p23Accepted
p24Accepted
p25Accepted
p26Accepted
p27Accepted
p28Accepted
p29Accepted
p30OnHold
p31Accepted
p32Not Proposing
p33Accepted

 

What i want is ,the total number of accepted projects,Onhold projects like that . please hlp me

  • Arul's avatar
    Arul
    5 years ago

    Hi ashik1992 ,

    I hope this would help you, If not please let me know.

    Thanks,

    -Arul

     

7 Replies

  • Hi, ashik1992 

    Please correct me if I wrongly understood.

    I guess you want to visualize like below, and if so, please try to create the below DAX measure.

     

    Status Count =
    IF (
         ISFILTERED ( 'Table'[Proposal Status] ),
         CALCULATE (
         COUNTROWS ( 'Table' ),
              FILTER (
              ALL ( 'Table' ),
              'Table'[Proposal Status] = SELECTEDVALUE ( 'Table'[Proposal Status] )
    )
    ),
    COUNTROWS ( 'Table' )
    )

     

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

  • Jihwan_Kim hello sir, this i wanted but when im applying the formula im getting diffrent count and but in the excel file count is correct 

    • Jihwan_Kim's avatar
      Jihwan_Kim
      Icon for Super User rankSuper User

      Hi, ashik1992 

      Thank you for your feedback.

      I am not sure how your data model looks like, but try to match all names in the DAX measure, including table name and column name.

      Or, if you have another column in the table, perhaps that might affect.

      if it is OK with you, please share your sample pbix file, then I can try to look into it and come up with a desirable solution.

      Thank you.