Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Calulating Weekly / Yearly Rejections

Hello All,

 

I need your help - Our team collects various weekly & yearly data and in this case the results can either be "Accepted or Rejected". Currently the raw data is retrieve from a Oracle database into an excel workbook then calulations are done within this WB.

 

Since we are now using Power BI tool we would love to by past the excel steps altogether and have all the calulations performed within Power BI.

 

Below is an example of the data & proposed layout:

 

Table A - all collected raw data

Table B - needs to be populated with Table A results via. Yearly

Table C - needs to be populated with Table A results via. Weekly

 

Any help would be greatly appericated.

Table A:

 

 

  • Add a year column to your first table:

     

    Year = YEAR([Date])

    Then your second table becomes:

    Table4 = 
    VAR __count = COUNTROWS(ALL('Table3'))
    RETURN
    SUMMARIZE('Table3',[Year],[Action],"Year Qty",COUNTROWS('Table3'),"%",COUNTROWS('Table3')/__count)

    Your third table is simply a variation of this.

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Add a year column to your first table:

     

    Year = YEAR([Date])

    Then your second table becomes:

    Table4 = 
    VAR __count = COUNTROWS(ALL('Table3'))
    RETURN
    SUMMARIZE('Table3',[Year],[Action],"Year Qty",COUNTROWS('Table3'),"%",COUNTROWS('Table3')/__count)

    Your third table is simply a variation of this.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello Greg,

       

      Thanks you very much - I've been attempting too implemented those Power BI results you so kindly supplied for 2 weeks now :smileyvery-happy:.

       

      Kind regards,

       

      Thanks again,

      Don