Forum Discussion
percentage
Hello,
On power bi I have a table with a percentage column, and on the total, in stead of show the percentage of the total, power bi sums all the percentages:
How can I solve it?
Thank you!
aleon : As per my understanding you are trying to find % of REPO S over total (REPO S + REPO N)
If yes, do the following
- Do not create a column
- Just write the following measure and add it to your table
REPO S % =
SUM ( CustomerData[REPO S] )
/ ( SUM ( CustomerData[REPO S] ) + SUM ( CustomerData[REPO N] ) )Here is the snapshot of the result
You can download excel powerpivot file here
thanks
4 Replies
- ChandeepChhabraImpactful Individual
Hi aleon, Can you please share a dummy of your .pbix file ?
- corbusierAdvocate IV
How are the percentages calculated? If they are calculated outside of Power BI, for example as a field in a database query rather than via DAX, they may need to be set to Summarize as Average instead of Sum.
- aleonFrequent Visitor
They are calculated on power bi, I have added a new column to the table with the next formula:
REPO_S_PERCENTATGE = DIVIDE(customer_data[REPO_S];customer_data[REPO_S]+customer_data[REPO_N];0)
- ChandeepChhabraImpactful Individual
aleon : As per my understanding you are trying to find % of REPO S over total (REPO S + REPO N)
If yes, do the following
- Do not create a column
- Just write the following measure and add it to your table
REPO S % =
SUM ( CustomerData[REPO S] )
/ ( SUM ( CustomerData[REPO S] ) + SUM ( CustomerData[REPO N] ) )Here is the snapshot of the result
You can download excel powerpivot file here
thanks