Forum Discussion
bdaodu
4 years agoNew Member
DAX formulas
Please help. I have a table that looks like this and woud like to calculate the following: 1. DAX formula to calculate $ for AA as % of total $ for each project. 2. DAX formula to calculate $ fo...
- 4 years ago
Hey bdaodu ,
this measure
Measure 1 = DIVIDE( SUM('Table'[$] ) , CALCULATE( SUM( 'Table'[$] ) , ALL( 'Table'[WBS Level 2] ) ) )returns what you are looking for, for the 1st formula:
Use the formatting optionHopefully, this provides what you are looking for.
Regards,
Tom
bdaodu
4 years agoNew Member
For 1. DAX formula to calculate $ for AA as % of total $ for each project.;
the expected result would be a table like this: using the followibg formula:
sum of AAs for project x/ sum of project x total
| Project | WBS Level 2 | % |
| X/9999 | AA | 70% |
| X/9999 | BB | 39% |
| X/9999 | CC | 0% |
| X/9999 | DD | -9% |
| X/10000 | AA | 24% |
| X/10000 | BB | 33% |
| X/10000 | CC | 7% |
| X/10000 | DD | 9% |
| X/10000 | EE | 27% |
TomMartens
4 years agoSuper User
Hey bdaodu ,
this measure
Measure 1 =
DIVIDE(
SUM('Table'[$] )
, CALCULATE(
SUM( 'Table'[$] )
, ALL( 'Table'[WBS Level 2] )
)
)
returns what you are looking for, for the 1st formula:
Use the formatting option
Hopefully, this provides what you are looking for.
Regards,
Tom
- bdaodu4 years agoNew Member
Thank you!! It worked!
- TomMartens4 years agoSuper User
Hey bdaodu ,
please mark an answer as solution, this will help others, looking for a similar solution.
Regards,
Tom