cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper IV

## Calculate SUM of dax measure

Hi,

I have my data like:

state hours  days

NY    100      1

NY     140      2

NJ     100      1

NJ      200     2

NJ     300      3

dax:   HOURS_PER_DAY= SUM(HOURS)/ MAX(DAYS)

RESULT TABLE IN POWERBI:

STATE    HOURS_PER_DAY

NY             120

NJ              200

TOTAL       280

MY REQUIREMENT:

STATE    HOURS_PER_DAY

NY             120

NJ              200

TOTAL       320

i WANT TO SHOW total as sum(hours_per_day) .

Thanks

1 ACCEPTED SOLUTION
Super User

Hey,

this measure

```Measure =
SUMX(VALUES('Table1'[State]),
CALCULATE(SUM(Table1[Hours])
,ALLEXCEPT('Table1',Table1[State])
)
/CALCULATE(MAX(Table1[Days])
,ALLEXCEPT('Table1',Table1[State])
)
)```

creates what you are looking for

Hope this is what you're looking for

Regards

Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Super User

Hey,

this measure

```Measure =
SUMX(VALUES('Table1'[State]),
CALCULATE(SUM(Table1[Hours])
,ALLEXCEPT('Table1',Table1[State])
)
/CALCULATE(MAX(Table1[Days])
,ALLEXCEPT('Table1',Table1[State])
)
)```

creates what you are looking for

Hope this is what you're looking for

Regards

Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Announcements

#### Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors