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 agotry a measure like this
Measure =
var _currentContextDay = DATE(YEAR(SELECTEDVALUE('Table'[timestamp]));MONTH(SELECTEDVALUE('Table'[timestamp]));DAY(SELECTEDVALUE('Table'[timestamp])))
var _countCurDay = CALCULATE(DISTINCTCOUNT('Table'[messenger_id]);FILTER(ALL('Table');'Table'[timestamp].[Date]=_currentContextDay))
var _countLastDay = CALCULATE(DISTINCTCOUNT('Table'[messenger_id]);FILTER(ALL('Table');_currentContextDay=DATEADD('Table'[timestamp].[Date];1;DAY)))
return
1-DIVIDE(_countLastDay;_countCurDay)do not hesitate to give a kudo to useful posts and mark solutions as solution
zawlh
Helper I
6 years agoaz38 I am sorry. Because of my bad English writing, I think you misunderstand something. I want X-axis to be Day Number(day01-begin,day01-end,day02-begin,.....). The percent change I want is how many percent of users have dropped from day01 to day02 to day03 to ........
Thanks for your patience and guiding.
I hope you can help me with this.
- az386 years ago
Community Champion
look here https://ufile.io/lvak35gl
simple example which looks like you need (as I think)
do not hesitate to give a kudo to useful posts and mark solutions as solution