Forum Discussion
Calculations based on Conditional Calculated columns
- 5 years ago
Hi Anonymous ,
You may create measures like DAX below.
Prod% = VAR _Prod = CALCULATE ( SUM ( Table1[PeriodMins] ), FILTER ( Table1, Table1[ProductiveSplit] = "Prod" ) ) VAR _Total = CALCULATE ( SUM ( Table1[PeriodMins] ), ALLSELECTED ( Table1 ) ) RETURN DIVIDE ( _Prod, _Total ) Known% = VAR _Prod = CALCULATE ( SUM ( Table1[PeriodMins] ), FILTER ( Table1, Table1[ProductiveSplit] = "Prod" ) ) VAR _Known = CALCULATE ( SUM ( Table1[PeriodMins] ), FILTER ( Table1, Table1[ProductiveSplit] = "NP-Known" ) ) VAR _Total = CALCULATE ( SUM ( Table1[PeriodMins] ), ALLSELECTED ( Table1 ) ) RETURN DIVIDE ( _Prod + _Total, _Total )Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , if you want hybrid table like the one not possible. I logged an idea
https://ideas.powerbi.com/ideas/idea/?ideaid=9bc32b23-1eb1-4e74-8b34-349887b37ebc
There is % wise total option in matrix , column-wise too. right click on periodmins under values and check
refer if those can help
or you can create a new meausre
divide(sum(table[period mins]),calculate(sum(table[period mins]). allexcept(Table,table[productivesplit])))
or
divide(([period mins]),calculate(([period mins]). allexcept(Table,table[productivesplit])))
- Anonymous6 years agoNot applicable
Thanks amitchandak for your reply.
This does kind of work, if I display values as %s. However, I have extra columns that I dont need to show, how do I get rid of them (marked x)?
Also, how can I get the 2nd calculation/column: Known% = (Prod + NP-Known) / (NP-Known+ NP-Unknown + Prod) ?