Forum Discussion

alicito1802's avatar
alicito1802
New Member
2 years ago
Solved

Create a transposed table from an existing table

I have the following table with 10 KPI but I am struggling to make a bar chart and an stacked bar chart with it, I did a manual table and found the solution that allow me to plot the data and get my ...
  • alicito1802's avatar
    alicito1802
    2 years ago

    I solved like this:

    Copied the original table.

    In the copied table selected the 10 KPI columns and unpivot them.

    Renamed The Attribute Colum to KPI

    Clicked “Create New table” in the data model and used the summarize function as follow:

    SummarizedRAG =

    SUMMARIZE(

         'DB (3)',

         'DB (3)'[KPI],

         "RedCount", COUNTROWS(FILTER('DB (3)','DB (3)'[Value]="Red")),

         "AmberCount", COUNTROWS(FILTER('DB (3)','DB (3)'[Value]="Amber")),

         "GreenCount", COUNTROWS(FILTER('DB (3)','DB (3)'[Value]="Green"))

    )