Forum Discussion

swise001's avatar
swise001
Continued Contributor
5 years ago
Solved

Aggregation Table - Issue selecting detail column

I've created a direct-query aggregation table with 3 aggregations on DateKey

 

Sum of QTY

Sum of Sales

Count of Sales: 

Here is an image of the agg table creation (done in Power Query)

 

Once in the model - I'm trying to set the appropriate aggregations 

 

I am trying to setup SumQty to reflect the Sum of the Qty column, 

It would have to same structure as SalesSum - except - with "Qty"  in the Detail column instead of Sales. 

However, when I open the drop down menu to select "Qty" it's not available. 

Any ideas why the Qty column column would be 'greyed' out for the SumQty detail column?

 

 

  • The source table data type was ultimately the source of the issue. 

     

    I updated the source View to cast "Qty" in the same format as Sales.  Once updated, the aggregation table then allowed me to select Qty for that column.  

4 Replies

  • Watsky's avatar
    Watsky
    Solution Sage

    swise001  if you highlight over the QTY option in the drop down it should give you a message that tells you what is going on. What is it telling you when you highlight over it?

    • swise001's avatar
      swise001
      Continued Contributor

      Watsky 

       

      "detail column must be the same type as the aggregation column for sum aggregations"

       

      From the view I am using - Qty has datatype "int" and Sales has datatype "decimal".

       

      Not sure if this is where the issue lies, but sharing just in case.  

       

       

       

       

       

      • swise001's avatar
        swise001
        Continued Contributor

        The source table data type was ultimately the source of the issue. 

         

        I updated the source View to cast "Qty" in the same format as Sales.  Once updated, the aggregation table then allowed me to select Qty for that column.