cancel
Showing results for
Search instead for
Did you mean:
Highlighted
Helper I

## Dax help

H Power Users,

I need help with a DAX calculation. I have 2 table and have relationship. I have Type column in table 1 and Amount column in Table 2.

Below is the example data.

 Input Type Amount A 100 B 200 C 300 D 400 Total 1000

 Output Type Amount Total A 100 1000 B 200 1000 C 300 1000 \D 400 1000 Total 1000 1000

Total is the measure of Sum(Amount)

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IX

## Re: Dax help

@Kumarcy  - So maybe:

``Total Column = SUMX(ALL('Table2'),[Amount])``

---------------------------------------

@ me in replies or I'll lose your thread!!!

##### I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

5 REPLIES 5
Highlighted
Super User V

## Re: Dax help

Hi @Kumarcy ,

Try this measure:

Measure = CALCULATE(SUM('Table'[Amount]), ALL('Table'[Type]))

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Highlighted
Super User IX

## Re: Dax help

@Kumarcy  - So maybe:

``Total Column = SUMX(ALL('Table2'),[Amount])``

---------------------------------------

@ me in replies or I'll lose your thread!!!

##### I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Highlighted
Helper I

## Re: Dax help

@Greg_Deckler Thank you. It worked really well. I would like calculate % Total based on the measure created.

%Total= Amount/ Total

Out put:

 Output Type Amount Total % Total A 100 1000 10% B 200 1000 20% C 300 1000 30% \D 400 1000 40% Total 1000 1000 100 %

Thanks,

Highlighted
Super User IX

## Re: Dax help

@Kumarcy - That should just be:

``Total % = [Amount] / [Total]``

---------------------------------------

@ me in replies or I'll lose your thread!!!

##### I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Highlighted
Helper I

## Re: Dax help

@Greg_Deckler Thanks for reply. I have a blank value in type and has amount to that. I would like to include the amount in total measure but should not show in the visual and i have a visual filter like id not equal to 1.  How can i acheive this?

## Helpful resources

Announcements

#### Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

#### Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

#### Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

#### Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors