Forum Discussion
Funnel Form step analysis Calculated Metric DAX
- Anonymous8 years ago
KamphuisB,
Add an index column in your table in Query Editor of Power BI Desktop.
Then create the following columns in your table.Step/step1 = DIVIDE(Table[Count], CALCULATE(SUM(Table[Count]),FILTER(Table,Table[Steps]="A")))
Step/previous step = var previous= CALCULATE(FIRSTNONBLANK(Table[Count],Table[Count]),FILTER(Table,Table[Index]=EARLIER(Table[Index])-1) ) return IF(ISBLANK(previous),1, divide(Table[Count],previous))
Regards,
Lydia
KamphuisB,
I have sent your modified PBIX file via Private Message.
Regards,
Lydia
It's ok, that you sent private message,
but what is the solution?
- KamphuisB7 years agoFrequent Visitor
Hi analyticsmsk ,
Indeed I should have placed the final answer here. It has been a while but I recreated the scenario for you.
In my previous reply you can see that the dataset contains pages in between so you are not able to do a EARLIER or MIN(INDEX) - 1 because it could also be index - 3 etc.
There was only 1 solution for me in which I needed to add a conditional order column based on the steps(pages) that I have in my dataset. So I did stepA = 10, stepB = 20, etc
So based on the example the dataset looks like this:
With that placed I created the following calculated metric:
Step/pStep_adjusted = var previous = CALCULATE(FIRSTNONBLANK('Table'[Count];'Table'[Count]);FILTER(ALLSELECTED('Table');'Table'[Order (conditional column)]=MIN('Table'[Order (conditional column)])-10)) return IF(DIVIDE(SUM('Table'[Count]);previous)=BLANK();1;DIVIDE(SUM('Table'[Count]);previous))In order to have the data that I needed:
Kind regards,
Bas Kamphuis