Forum Discussion
Shadd307
4 years agoFrequent Visitor
Sum values from 1 column based on a value in a second column
Total newbie here so please forgive me if this seems really simple. I am using Jira data loaded into Power BI and I am trying to calculate the total number of story points for issues that are a c...
- 4 years ago
Measure:
story_points total for epic_link = IF( HASONEVALUE('Table (2)'[epic_link]), CALCULATE( SUM('Table (2)'[story_points]), filter( allselected('Table (2)'), 'Table (2)'[epic_link] = SELECTEDVALUE('Table (2)'[epic_link]) ) ), SUM('Table (2)'[story_points]) )You can use all('Table (2)') or allselected('Table (2)') per your needs ...
https://mitchellpearson.com/2020/09/14/understanding-row-context-in-dax-and-power-bi/
sevenhills
4 years agoSuper User
Measure:
story_points total for epic_link =
IF( HASONEVALUE('Table (2)'[epic_link]),
CALCULATE(
SUM('Table (2)'[story_points]),
filter( allselected('Table (2)'),
'Table (2)'[epic_link] = SELECTEDVALUE('Table (2)'[epic_link])
)
),
SUM('Table (2)'[story_points])
)
You can use all('Table (2)') or allselected('Table (2)') per your needs ...
https://mitchellpearson.com/2020/09/14/understanding-row-context-in-dax-and-power-bi/