Forum Discussion
How to create a percentage from table
- Anonymous2 years ago
Hi,
Thanks for the solution johnbasha33 provided, and i want to offer some more information for user to refer to.
hello quickbi , based on your description, you can refer to the follwing solution.
Sample data
The measure is the same as yours.
You can create a new measure.
MEASURE = VAR a = CALCULATE ( MIN ( cohort[created_at] ), ALLEXCEPT ( cohort, cohort[cohort_date], cohort[created_at].[Year] ) ) VAR b = CALCULATE ( [Customer Cohort], ALLSELECTED ( cohort ), cohort[cohort_date] IN VALUES ( cohort[cohort_date] ), EOMONTH ( cohort[created_at], 0 ) = EOMONTH ( a, 0 ) ) RETURN DIVIDE ( [Customer Cohort], b )Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi johnbasha33
Thanks for your answer, unfortunaley I did not had the result.
Hi,
Thanks for the solution johnbasha33 provided, and i want to offer some more information for user to refer to.
hello quickbi , based on your description, you can refer to the follwing solution.
Sample data
The measure is the same as yours.
You can create a new measure.
MEASURE =
VAR a =
CALCULATE (
MIN ( cohort[created_at] ),
ALLEXCEPT ( cohort, cohort[cohort_date], cohort[created_at].[Year] )
)
VAR b =
CALCULATE (
[Customer Cohort],
ALLSELECTED ( cohort ),
cohort[cohort_date] IN VALUES ( cohort[cohort_date] ),
EOMONTH ( cohort[created_at], 0 ) = EOMONTH ( a, 0 )
)
RETURN
DIVIDE ( [Customer Cohort], b )
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- quickbi2 years ago
Helper II
thank you very much, it works!!!