Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Calculating percentage change through time

Hi I am new to PowerBi and I have a data set with two columns: date and action type(ABC, DEF, GHI). I am interested to find the percent change in the ABC action type through the years with the forumla of ABC/(DEF+GHI), but how would I go about calculating that and then doing a line graph? Specifically with the line and clustered column chart.

  • Anonymous ,

     

    You may try adding measure below.

    Measure =
    DIVIDE (
        COUNTROWS ( FILTER ( Table1, Table1[type] = "ABC" ) ),
        COUNTROWS ( FILTER ( Table1, Table1[type] IN { "DEF", "GHI" } ) )
    )
    

1 Reply

  • v-chuncz-msft's avatar
    v-chuncz-msft
    Icon for Community Support rankCommunity Support

    Anonymous ,

     

    You may try adding measure below.

    Measure =
    DIVIDE (
        COUNTROWS ( FILTER ( Table1, Table1[type] = "ABC" ) ),
        COUNTROWS ( FILTER ( Table1, Table1[type] IN { "DEF", "GHI" } ) )
    )