Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

how to create a summary table

i have data as below PK batch status 1 1 progress 1 2 comp 1 3 comp 1 4 comp 1 5 progress 2 1 progress 2 2 progress 2 3 null 3 1 progress 3 2 p...
  • Icey's avatar
    Icey
    6 years ago

    Hi Anonymous ,

     

    Well, the code above return for your understanding is correct. Before I explain the return part of the code, you may need to understand the SWITCH function first.

    The return part is to choose from three different situations:

    If the 'status'[status] column is equal to "progress / null", then it counts the situation of [status] = "progress" or [status] = "null" in the t2 table.

    If the 'status'[status] column is equal to "progress ", then it counts the situation of [status] = "progress" in the t2 table.

    If the 'status'[status] column is equal to "null", then it counts the situation of [status] = "null" in the t2 table.

     

    I use Enter data to create the status table. And I created the status table to display my measures.

     

     

    Best Regards,

    Icey

     

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