cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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!:
The Definitive Guide to Power Query (M)

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!:
The Definitive Guide to Power Query (M)

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!:
The Definitive Guide to Power Query (M)

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

#### 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 Monthly Update - June 2024

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

#### New forum boards available in Real-Time Intelligence.

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

Top Solution Authors
Top Kudoed Authors