Forum Discussion
BhagyashriM42
4 years agoFrequent Visitor
Calculated column- percentage using different columns
Hello Community, I want to calculate a calculated column where it will give the % of particular categories as given in the screenshot,I have tried using earlier function to get count of "Happy" a...
- 4 years ago
BhagyashriM42 here is a link to the file with the solution:
Test-calcolfile.pbix
SpartaBI
4 years agoCommunity Champion
BhagyashriM42 if I understood what you need then creare this calculated column:
Pct from Category and Age-Group =
VAR _current_category = 'Table'[Category]
VAR _current_age_group = 'Table'[Age-Group]
VAR _current_kpi = 'Table'[KPI]
VAR _num =
COUNTROWS(
FILTER('Table',
'Table'[Category] = _current_category
&& 'Table'[Age-Group] = _current_age_group
&& 'Table'[KPI] = _current_kpi
)
)
VAR _denum =
COUNTROWS(
FILTER('Table',
'Table'[Category] = _current_category
&& 'Table'[Age-Group] = _current_age_group
)
)
VAR _result = DIVIDE(_num, _denum)
RETURN
_result