Forum Discussion
DAX Formula
I have created PBI summarized table and I need another column DAX Formula
column grant total divided by rows total NOT Sum of amount (later will add multiple columns)
like 5 /43 , 31/43 , 7/43 how to get this its dynamic
Please try the measure below:
% of Total = DIVIDE( SUM('YourTable'[Amount]), CALCULATE( SUM('YourTable'[Amount]), ALLSELECTED('YourTable') ) )
6 Replies
- cengizhanarslanSuper User
Please try the measure below:
% of Total = DIVIDE( SUM('YourTable'[Amount]), CALCULATE( SUM('YourTable'[Amount]), ALLSELECTED('YourTable') ) )- AnonymousNot applicable
I need to create two tables to get calculation of value and %, how we can get one table instead of multiple.
this is example my tables contains huge dataset like region/country/state and etc..
example
Measure 1 = SUM(Table[amount]
Measure 2 =
% of Total = DIVIDE( SUM('YourTable'[Amount]), CALCULATE( SUM('YourTable'[Amount]), ALLSELECTED('YourTable') ) )
- rohit1991Super User
Hii Anonymous
You need row value ÷ overall grand total (dynamic). Create a measure, not a column:
% of Grand Total = DIVIDE( SUM('Table'[Amount]), CALCULATE( SUM('Table'[Amount]), ALL('Table') ) )This keeps the row context (China, International, USCAN) but removes filters to get full grand total (43).
- AnonymousNot applicableIts return all rows = 1, which is wrong
Grand Total =DIVIDE( [amount],CALCULATE([amount],ALL('Region Table'[Region])))
- Ashish_MathurSuper User
Hi,
First write an explicit measure
Total = sum(Data[Amount])
Then use a visual calculation.
- Ashish_MathurSuper User
Hi,
First write an explicit measure
Total = sum(Data[Amount])
Then use a visual calculation.