Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Calculate a column from two calculated column in a report table

Hi dear community !   I have a table on my report where i put the number of cars at date 1, the % of the total1 (by adding the same column and put it as "percent of a grand total"), number of cars ...
  • v-juanli-msft's avatar
    v-juanli-msft
    7 years ago

    Hi Anonymous 

    % total_2 =
    CALCULATE ( SUM ( 'Table'[number] ), ALLEXCEPT ( 'Table', 'Table'[date] ) )
        / CALCULATE ( SUM ( 'Table'[number] ), ALL ( 'Table' ) )
    

    Change the measure as below

    % total_2 =
    SUMX(ALLEXCEPT ( 'Table', 'Table'[date] ),'Table'[number])
        / SUMX(  ALL ( 'Table' ) ,'Table'[number])

     

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.