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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Marcin
Helper V
Helper V

Average per month in quarter

HI,

 

I am looking for DAX solution for this calculation:

 

QuarterMonthBonus
2018Q1Jan-1836000
2018Q1Feb-18 
2018Q1Mar-18 
2018Q2Apr-1827000
2018Q2May-18 
2018Q2Jun-18 
2018Q3Jul-1842000
2018Q3Aug-18 
2018Q3Sep-18 
2018Q4Oct-1824000
2018Q4Nov-18 
2018Q4Dec-18 

 

I would like to create a measure that will all me to get something like this:

 

QuarterMonthBonusAverage per month
2018Q1Jan-183600012000
2018Q1Feb-18 12000
2018Q1Mar-18 12000
2018Q2Apr-18270009000
2018Q2May-18 9000
2018Q2Jun-18 9000
2018Q3Jul-184200014000
2018Q3Aug-18 14000
2018Q3Sep-18 14000
2018Q4Oct-18240008000
2018Q4Nov-18 8000
2018Q4Dec-18 8000

 

I will be grateful for help with that.

 

 

1 ACCEPTED SOLUTION
Omega
Impactful Individual
Impactful Individual

Assuming you are using table 1, try creating the below measure 

 

 

Average per Quarer = CALCULATE(SUM(Table1[Bonus])/3,ALLEXCEPT(table1,Table1[Quarter]))

Average Quarter.JPG

View solution in original post

8 REPLIES 8
Omega
Impactful Individual
Impactful Individual

Assuming you are using table 1, try creating the below measure 

 

 

Average per Quarer = CALCULATE(SUM(Table1[Bonus])/3,ALLEXCEPT(table1,Table1[Quarter]))

Average Quarter.JPG

Hi @Omega,

 

This measure works only when measuer is sliced by quarter dimension . 

I have one more question, how can I create a calculated column where all those bonuses will be presented by month ? 

 

I have a salary table where each row corresponds to each month and would like to have column with bonuses calcualted as mentioned.

 

Or maybe new measure where in that table above the column with qurter will not be presented . 

 

I would like to get something like this : 

 

MonthBonusAverage per month
Jan-183600012000
Feb-18 12000
Mar-18 12000
Apr-18270009000
May-18 9000
Jun-18 9000
Jul-184200014000
Aug-18 14000
Sep-18 14000
Oct-18240008000
Nov-18 8000
Dec-18 8000

 

Marcin 

Omega
Impactful Individual
Impactful Individual

I simplified the formula. The challenge will be that all months that don't have bonuses will have zero. Power BI supresses blanks 😞 

 

Average = IF(ISBLANK(SUM(Table1[Bonus])),0,SUM(Table1[Bonus])/3)

I used this formula as calculated column and got this table , which is not I wanted to get 😕 

 

Capture.PNG

Omega
Impactful Individual
Impactful Individual

The formula in my previous post was used as a measure. If you want to use a column, try: 

 

Average  = IF(ISBLANK(Table1[Bonus]),BLANK(),Table1[Bonus]/3)

Hi @Omega,

 

thanks, I understad now.

 

Any idea how to extend those average values into months wihtout Bonus ?

 

Capture.PNG

We can also assume that there is time table with Months and Quarters as dimension. 

that works, thank you.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.