Forum Discussion

tester_001's avatar
tester_001
New Member
6 years ago

Use different groups in Measures

Hello!

 

I have a table like this:

Table 1

 

I need to calculate:

- Measure1 = select sum(col_1) from Table group by dt, col_1

- Measure2 = select sum(col_2) from Table group by dt, col_1, col_2



 

And as a result i need to create a matrix visual where Rows will be defined by col_2 values, Columns will be defined by dt and Values will be calculated as Measure2 / Measure1.

Please, help me πŸ™‚

1 Reply

  • If you need to create a matrix visual, then drag the Dt and  column on row and again the col on value and use aggregation sum

    a simple measure like this should do sum(table[col1])

     

    If need new Tables

    summarize(Table, Table[dt],table[col1], "measure1",sum(table[col1]))
    summarize(Table, Table[dt],table[col1], table2[col_2], "measure1",sum(table[col2]))