Forum Discussion
Calculate column
- 3 years ago
Hi, NELfr
According to your description , you want to " trying to create a meassure or column that indicate the % of 1 and 0 based on the grand total".
For your need , i recommend you to use the measure to realize your need.
Here are the steps you can refer to :
(1)This is my test data:
(2) We can create a measure like this:
% = DIVIDE(COUNT('Table'[activación_flag]) , CALCULATE( COUNT('Table'[activación_flag]) , ALL('Table')))(3)Then we can put the field and the measure on the visual and we will meet your need , the result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi NELfr , if you have a table (column) something like this:
You can create this 2 measures:
Activate = DIVIDE(CALCULATE(sum('Table'[activation_flag]),
'Table'[activation_flag]=1),COUNTROWS('Table'),"-")Inactive = 1 - [Activate]Best regards