Forum Discussion
Anonymous
7 years agoNot applicable
Calculate total based upon column conditions
I need to calculate the total value based upon the table above. If complexity is equal to low I need to multiply the backlog-complexity count by 25 and if medium the count by 80 and find the sum of these two results.
Hi Anonymous,
Please also try this DAX solution.
Measure = IF ( HASONEVALUE ( 'table'[Complexity] ), COUNT ( 'table'[Complexity] ), SUMX ( ALL ( 'table'[Complexity] ), IF ( [Complexity] = "Low", CALCULATE ( COUNT ( 'table'[Complexity] ) ) * 25, CALCULATE ( COUNT ( 'table'[Complexity] ) ) * 80 ) ) )
Best Regards,
2 Replies
- v-jiascu-msft
Microsoft Employee
Hi Anonymous,
Please also try this DAX solution.
Measure = IF ( HASONEVALUE ( 'table'[Complexity] ), COUNT ( 'table'[Complexity] ), SUMX ( ALL ( 'table'[Complexity] ), IF ( [Complexity] = "Low", CALCULATE ( COUNT ( 'table'[Complexity] ) ) * 25, CALCULATE ( COUNT ( 'table'[Complexity] ) ) * 80 ) ) )
Best Regards,
- AnonymousNot applicable
Hi,
You create a new column in Power Query.
In Add Column Tab -> Conditional Column
if Complexity contains Low then 25
elseif Complexity contails Medium then 80
elseif Complexity.Then create another column, which is multiplication of Blocklog-Complexity-Count * New Column.
Use it in the Report.
Regards,
Pavan Vanguri.