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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
EmaVasileva
Helper V
Helper V

Sum of a Calculated measure

Hi team,
I try to get the sum of rows of my last column, which is calc measure.  

YearMonthHoursDays in monthDays in month*1.5+Hours1-(ColumnE/(ColumnD*24)
2024January5931105.585.82%
2024February392982.588.15%
2024March423188.588.10%
2024April33307889.17%
2024May6731113.584.74%
2024June21306690.83%
2024July6131107.585.55%
2024August8131127.582.86%
2024September923013780.97%
2024October213167.590.93%
2024November227.530

272.5

62.15%
2024December12531171.576.95%


I need the average sum (%) of the last column.

Currently 'm using a couple of measures, but the total of the column which I received is not correct (11%) and I need 85%
I have Year,month, Hours-as a columns. 
DaysInMonth calc column = DAY(EOMONTH('test'[testdate].[Date], 0))
Days in month*1.5+Hours measure= AVERAGE(pmforecast[DaysInMonth2])*1.5+ sum(plan[taskduration])
LastColumn measure = 1 - Days in month*1.5+Hours/AVERAGE(DaysInMonth)*24

Thank you.


1 ACCEPTED SOLUTION

@EmaVasileva 

It worked for me, make sure you have no filters applied:

Fowmy_0-1703163121723.png

My table

Fowmy_1-1703163149111.png

 



 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@EmaVasileva 

Use this meaure: Replace table name and column names as per your model.

New Measure = 
AVERAGEX(
     Table11,
    VAR __DaysInMonth =  Table11[Days in month] * 1.5 + Table11[Hours]
    VAR __Result = 1 - DIVIDE(__DaysInMonth, (Table11[Days in month]  * 24 ) )
    RETURN
        __Result
)

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi @Fowmy ,
Thank you for the measure! I just tried it, and it works row by row, but in the end where I need to see the average of all percentages (last column) it gave me 31.53%, when the result should be 83.85%. Any ideas how I can fix it?

@EmaVasileva 

It worked for me, make sure you have no filters applied:

Fowmy_0-1703163121723.png

My table

Fowmy_1-1703163149111.png

 



 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

VijayP
Super User
Super User

@EmaVasileva 

Question is confusing! Whether you are talking about column in a Table (Query Table) or A Measure

Column and Measure are not same that is my question.

The above table what you have shown as an example is a visual in Power BI or A Table in power bi?




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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