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 agoits 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
zawlh
Helper I
6 years agoaz38 I will show you database
I cannot use the formula you provide unless you don't know exactly about my data
sorry for confidential data
- az386 years ago
Community Champion
distinct count of users should be calculate for a day or for the whole period before the day?
do not hesitate to give a kudo to useful posts and mark solutions as solution