Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Constant Column for Table Based on Measure

Hello! I am trying to create a table below in Direct Query mode and am struggling with the last step. I am trying to count the number of items in a table based on status and want to have another colu...
  • FreemanZ's avatar
    FreemanZ
    3 years ago

    you mean with measure? you can try to create with two measures with such code:

        Count1 = CALCULATE( COUNTROWS( TableName ) ),

        Count2 = CALCULATE( COUNTROWS( TableName ), TableName[Status] = "A" )
     
    try to plot a Table Visual, with Status column and the two measures.