Forum Discussion
zawlh
Helper I
6 years agoCalculate % 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...
az38
Community Champion
6 years agoHi 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
zawlh
Helper I
6 years agoaz38 the number is the distinctcount of messengerID. I want percent difference from previous column(column from chart). (For eg. 38% drop from day01-begin to day01-end (assuming day01-begin is 100%). Could you solve it ?
- az386 years ago
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