cancel
Showing results for
Did you mean:
Frequent Visitor

## Total amount based on team and overall

Hi Team,

I have 3 fields Team,Name,Amount , need to calculate amount based on team and overall as showed in result1 result2 column

Thanks
Jen

1 ACCEPTED SOLUTION
Super User

@jenani_user Maybe:

``````result1 measure =
VAR __team = MAX('Table'[team])
VAR __table = FILTER(ALL('Table'),[team] = __team)
VAR __result = SUMX(__table,[amount])
RETURN
__result

result2 measure = SUMX(ALL('Table'),[amount])``````

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
4 REPLIES 4
Super User

@jenani_user Maybe:

``````result1 measure =
VAR __team = MAX('Table'[team])
VAR __table = FILTER(ALL('Table'),[team] = __team)
VAR __result = SUMX(__table,[amount])
RETURN
__result

result2 measure = SUMX(ALL('Table'),[amount])``````

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Frequent Visitor

Thank you so much!!!!

Similarly I need to calculate amount for the month i.e MTD

Can you help with this @Greg_Deckler ?

Thanks

Jen

Super User

@jenani_user I don't see dates anywhere, but here is some of the basics of date intelligence.

You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Frequent Visitor

Hi Team,

I have 4 fields Team,Name,Amount ,Date, need to calculate amount based on team and overall as showed in result1MTD, result2MTD column based on date selection

Thanks

Jan

Announcements

#### Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

#### Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

#### Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

#### Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors