Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dcg38524
Helper III
Helper III

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:

RejectExample.jpg

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

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.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

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.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hello Greg,

 

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

 

Kind regards,

 

Thanks again,

Don

Happy to help! 🙂


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.