cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
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
TypeAmount
A100
B200
C300
D400
Total1000

 

 

Output 
TypeAmountTotal
A1001000
B2001000
C3001000
\D4001000
Total10001000

Total is the measure of Sum(Amount)

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IX
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!




View solution in original post

5 REPLIES 5
Highlighted
Super User V
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
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!




View solution in original post

Highlighted
Helper I
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   
TypeAmountTotal% Total
A100100010%
B200100020%
C300100030%
\D400100040%
Total10001000

100 %

 

Thanks,

 

Highlighted
Super User IX
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
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
Community Conference

Power Platform Community Conference

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

Upcoming Events

Experience what’s next for Power BI

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

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

Top Solution Authors