Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I am trying to work out what measure I need to show the percentage of each column series value grouped by month.
The X axis is the date and I am using column series to split the case origin.
I plan to put the measure in a tooltip which would show:
I have a table called 'Case', the date column is 'Case'[CreatedDate] and split into series 'Case'[Origin]
Solved! Go to Solution.
Hi @JaseC1 ,
You can try the following code:
% =
DIVIDE(
SUM( 'Table'[Values] ),
CALCULATE( SUM( 'Table'[Values] ), ALLSELECTED( 'Table'[Type] ) )
)
Result:
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JaseC1 ,
You can try the following code:
% =
DIVIDE(
SUM( 'Table'[Values] ),
CALCULATE( SUM( 'Table'[Values] ), ALLSELECTED( 'Table'[Type] ) )
)
Result:
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JaseC1
When you drag the field/column across on to the visual pane, do you have the ability to click the little down arrow and select Show Value As? If so, you may be able to achieve what you're after without code/measure.
Otherwise you can create the below three measures:
Total Sales = SUM ( Table[Amount] )
Total by Cat = CALCULATE ( [Total Sales] , ALL ( Table[Category] )
As Percent = DIVIDE ( [Total Sales] , [Total by Cat] , 0 )
Hopefully the above makes sense and apologies for syntax errors - on phone.
All the best,
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.