Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Measure Column to Count based on Condition

Dear All,

 

I am having the below table and I had created and want to have only one single Measure Column that tells about total number of Rows having for Sptin6 and total number rows in sprint5 ,Sprint4 etc...

 

can any one please help me how can I get it.

 

SnoIssuesStatusSprint
1768DoneSprint6
2888DoneSprint6
3666QA in ProgressSprint6
4999Deployed in ProdSprint6
5567DoneSprint5
6900DoneSprint5
7100In-ProgressSprint5


Thanks & Regards,

SAM_

  • Hi Anonymous 
    Either take sprint 2 times in a table then change the aggregatiopn of 2nd sprint to count.

     

    Or you can create measure seperately for Sprint count

    Measure count = COUNT(SAM[Sprint])

     

     

     

    I hope I answered your question!

     

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    Thanks to Uzi2019  solution, if you don't want to create a new table, you can refer to the following solution:

    Count = var _t = ADDCOLUMNS('Table',"Count",COUNTAX(FILTER(ALL('Table'),[Sprint]=EARLIER([Sprint])),[Sno]))
    RETURN MAXX(_t,[Count])

     

    Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

     

5 Replies

  • Uzi2019's avatar
    Uzi2019
    Community Champion

    Hi Anonymous 
    Either take sprint 2 times in a table then change the aggregatiopn of 2nd sprint to count.

     

    Or you can create measure seperately for Sprint count

    Measure count = COUNT(SAM[Sprint])

     

     

     

    I hope I answered your question!

     

  • Hi,

    Drag Sprint to a Table visual and write this measure

    Measure = countrows(Data)

    Hope this helps.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Ashish_Mathur  I am getting the total rows , But I am required to get the rows based on the sprint

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Thanks to Uzi2019  solution, if you don't want to create a new table, you can refer to the following solution:

    Count = var _t = ADDCOLUMNS('Table',"Count",COUNTAX(FILTER(ALL('Table'),[Sprint]=EARLIER([Sprint])),[Sno]))
    RETURN MAXX(_t,[Count])

     

    Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.