Forum Discussion
Nicky
7 years agoNew Member
subtract current row from first row
Hello to all. I'm trying to build tables for cohort analysis, and I want to make a matrix, where the percentage of users remaining in the next month with respect to the first one will be visible.
The left table is the percentage, and the right is the cohort.
I was able to restore the cohort table, but there were problems with the percent table:
This is how my data will be sent out:
Please help create a percent matrix in Power BI.
You may try the measure below.
Measure = DIVIDE ( SUM ( 'Table'[count] ), CALCULATE ( SUM ( 'Table'[count] ), TOPN ( 1, CALCULATETABLE ( VALUES ( 'Table'[cur_date] ), ALLSELECTED ( 'Table'[cur_date] ) ), 'Table'[cur_date], ASC ) ) )
1 Reply
- v-chuncz-msft
Community Support
You may try the measure below.
Measure = DIVIDE ( SUM ( 'Table'[count] ), CALCULATE ( SUM ( 'Table'[count] ), TOPN ( 1, CALCULATETABLE ( VALUES ( 'Table'[cur_date] ), ALLSELECTED ( 'Table'[cur_date] ) ), 'Table'[cur_date], ASC ) ) )