Multiplying two columns in yii2

I want to multiply two columns in yii2 and get its total in other column grid view i am trying is this but it is not giving the desired output how can I solve this issue.


<?= GridView::widget([

        //'dataProvider' => $dataProvider,

        'dataProvider'=>new ActiveDataProvider([

          'query' => Adanalytics::find()->

                where(['publisher_id' =>  Yii::$app->user->identity->id ])->

                select('id,ad_id,MAX(impression) AS impression, MAX(view) AS view, MAX(clicks) AS clicks,MAX(cpc) AS cpclick,MAX(cpv) AS cpview, (MAX(clicks)*MAX(cpc)) AS totalccost')->

                groupBy('ad_id, visitor_ip'),

        ]),

        'filterModel' => $searchModel,

        'columns' => [

            ['class' => 'yii\grid\SerialColumn'],


            //'id',

            'ad_id',

            //'advertiser_id',

            //'publisher_id',

            //'visitor_ip',

            //'type_ad',

            'impression',

            'view',

            'clicks',

            //'placed_date',

            //'cpc',

            //'cpv',

            'cpclick',

            'cpview',

            'totalccost',

            //'cpi',


            ['class' => 'yii\grid\ActionColumn'],

        ],

    ]); ?>

I have solved this problem using SQL query and added a total column at the bottom of the same.

https://www.yiiframework.com/forum/index.php/topic/76807-how-to-add-grand-total-to-the-bottom-of-yii2-grid-view/page__view__findpost__p__316657__fromsearch__1