Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Measure to have Multiple Countrows based on Conditions

 

Dear All,

 

I Created a Measure to get the total issues where Status is "Done" for Sprint="6" using below table for the measure

SprintCount =CALCULATE(COUNTROWS('Sheet1'),'Sheet1'[Sprint] = "Sprint6",'Sheet1'[Status] = "Done") and I am able to get the result too.
 
SnoIssuesStatusSprint
1768DoneSprint6
2888DoneSprint6
3666QA in ProgressSprint6
4999Deployed in ProdSprint6
5567DoneSprint5
6900DoneSprint5
7100In-ProgressSprint5

 

But when I use nestead CountRows as below I am unable to get the result 

SprintCount =CALCULATE(COUNTROWS('Sheet1'),'Sheet1'[Sprint] = "Sprint6",'Sheet1'[Status] = "Done") , COUNTROWS('Sheet1'),'Sheet1'[Sprint] = "Sprint5",'Sheet1'[Status] = "Done") .

 

Can any one please help me in knowing whats wrong in the above Measure for nestead Measure

 

Thanks & Regards,

SAM_

  • Uzi2019's avatar
    Uzi2019
    2 years ago

    Hi Anonymous 
    Add Sprint column to the chart for bifurcation 
    or
    Create seperate measure for sprint5 condition and sprint 6 condition.

     

     

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    I think  Uzi2019  's reply describes workaround but not detailed enough. I'll walk you through the exact process on my end.

    According to your statement, I think you can try to add the [Sprint] column in X-axis and add below measure in Y-axis to create a clustered column chart.

    Measure:

    SprintCount = CALCULATE(COUNTROWS('Sheet1'),'Sheet1'[Status] = "Done")

    Result is as below.

     

    Best Regards,
    Rico Zhou

     

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

     

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous Try this:

    SprintCount =
    COUNTROWS(FILTER('Sheet1', [Sprint] = "Sprint6" && [Status] = "Done") 
    +
    COUNTROWS(FILTER('Sheet1', [Sprint] = "Sprint5" && [Status] = "Done") 
    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg_Deckler  Thanks for rapid response .

      I would like to have 2 results in 1 measure , But not summing it . As you can see there is stacked chart for sprint6 for measure  SprintCount =CALCULATE(COUNTROWS('Sheet1'),'Sheet1'[Sprint] = "Sprint6",'Sheet1'[Status] = "Done"and beside it I want to have result of Sprint 5 in same chart for comparision.

       

       

      • Uzi2019's avatar
        Uzi2019
        Community Champion

        Hi Anonymous 
        Add Sprint column to the chart for bifurcation 
        or
        Create seperate measure for sprint5 condition and sprint 6 condition.