Forum Discussion
Help with Dividing two categories in a single data column
Please see screenshot. This is a matrix table. I wish to divide 'engaged' by 'reached'. However these are categories and all share the same 'value' column. So how do I do this? i.e. the logic needs to be division where value=engaged / where value = reached. Please help! Thanks
Hi Anonymous ,
You need to create a measure with the following syntax:
% Engaged/reached CALCULATE(SUM(Table1[Value]);Table1[Type] = "Engaged")/ CALCULATE(SUM(Table1[Value]);Table1[Type] = "Reached")
Regards,
MFelix
- Anonymous7 years ago
Thanks, this got me on the right track. I had to insert apostropes though around table names and also replace your semi colons with commas. So the correct result was:
ER% = CALCULATE(SUM('Data 2019'[Value]),'Data 2019'[KPI] = "Engaged")/ CALCULATE(SUM('Data 2019'[Value]),'Data 2019'[KPI] = "Reached") Hi Anonymous ,
You must reduce the size of the columns you want to hide, be carefull to turn off word wrap on columns title and values.
This is a workaround but is the way to achieve your goal.
Regards,
MFelix
6 Replies
- MFelix
Super User
Hi Anonymous ,
You need to create a measure with the following syntax:
% Engaged/reached CALCULATE(SUM(Table1[Value]);Table1[Type] = "Engaged")/ CALCULATE(SUM(Table1[Value]);Table1[Type] = "Reached")
Regards,
MFelix
- AnonymousNot applicable
Thanks, this got me on the right track. I had to insert apostropes though around table names and also replace your semi colons with commas. So the correct result was:
ER% = CALCULATE(SUM('Data 2019'[Value]),'Data 2019'[KPI] = "Engaged")/ CALCULATE(SUM('Data 2019'[Value]),'Data 2019'[KPI] = "Reached")- MFelix
Super User
Hi Anonymous ,
That question about the commas and the names of the tables as to do with the regional settings on the computer it's a normla thing.
Glad I could help.
Regards,
MFelix