Forum Discussion
Calculate % change from previous column
Hello everyone, I am new to Power BI. We used Postgres data from our chatbot system.
So this is our chatbot result. I would like to calculate % change with line value showing how many % of user drop/jump in each day.
Can anyone help with me.
Database is like that
12 Replies
- az38
Community Champion
Hi zawlh
please, provide your desired output more accurace.
what is "how many % of user drop/jump in each day" ?
what is the total users? total by day, total cummulative or smth? How exactly calculate it? maybe you can display an example
where is users field in your data model?
do not hesitate to give a kudo to useful posts and mark solutions as solution
- az38
Community Champion
its still not almost clear but try to create a measure like
Measure = var _prevDayNumberStart = CALCULATE(MAX('Table'[Day Number]), FILTER(ALL('Table'), 'Table'[timestamp] < SELECTEDVALUE('Table'[timestamp]) && CONTAINSSTRING('Table'[Day Number],"begin")) var _prevDayTimestamp = CALCULATE(MAX('Table'[timestamp]), 'Table'[Day Number]=_prevDayNumberStart) RETURN DIVIDE( CALCULATE(DISTINCTCOUNT('Table'[messenger_id]), FILTER(ALL('Table'), 'Table'[timestamp] < SELECTEDVALUE('Table'[timestamp])), CALCULATE(DISTINCTCOUNT('Table'[messenger_id]), FILTER(ALL('Table'), 'Table'[timestamp] < _prevDayTimestamp) )not sure, it will work, need to check
do not hesitate to give a kudo to useful posts and mark solutions as solution