Forum Discussion
Anonymous
6 years agoNot applicable
Measures into Columns
Hi everyone! I have two mesures Total Depth and Total Time. Since I can't plot them in one line chart ( Depth vs Time where Time is on the X-axis), I need to convert these measures into columns. How do I do it?
Total depth = ((
var _stepno = SELECTEDVALUE('DM_WELL_PLAN_OP'[step_no])
return
IF(
_stepno=1,
SELECTEDVALUE('DM_WELL_PLAN_OP'[md_from]),
LOOKUPVALUE('DM_WELL_PLAN_OP'[md_to],'DM_WELL_PLAN_OP'[step_no],_stepno-1)
))+SUM(CD_DATUM[datum_elevation]))*(-1)*0.3048
Total time = (CALCULATE(SUM('DM_WELL_PLAN_OP'[target_duration]),FILTER(ALL('DM_WELL_PLAN_OP'),'DM_WELL_PLAN_OP'[step_no]<MAX('DM_WELL_PLAN_OP'[step_no])))+0)/24
6 Replies
- mwegenerMost Valuable Professional
Hi Anonymous ,
I would say that is not possible.
Columns are static and measures are dynamic.
If the dynamic is to be preserved, this is not possible.Otherwise you can create a corresponding calculated table if necessary.
- v-kelly-msftCommunity Support
Hi Anonymous ,
Once converted to columns,you will get fixed values,which wont be changed by your parameter.
Try below expressions:
Total depth = (( var _stepno = 'DM_WELL_PLAN_OP'[step_no] return IF( _stepno=1, 'DM_WELL_PLAN_OP'[md_from], LOOKUPVALUE('DM_WELL_PLAN_OP'[md_to],'DM_WELL_PLAN_OP'[step_no],_stepno-1) ))+CD_DATUM[datum_elevation]*(-1)*0.3048Total time = (CALCULATE(SUM('DM_WELL_PLAN_OP'[target_duration]),FILTER('DM_WELL_PLAN_OP','DM_WELL_PLAN_OP'[step_no]<EARLIER('DM_WELL_PLAN_OP'[step_no])))+0)/24Best Regards,
KellyDid I answer your question? Mark my post as a solution!- AnonymousNot applicable
Hi v-kelly-msft many thanks! I've used the expression for creating a new column called Total time, but its values are higher than in the measure by constant 0.04. Any idea where is this difference coming from?
- v-kelly-msftCommunity Support
Hi Anonymous ,
Could you pls provide me some raw data in editable format to test?
Best Regards,
KellyDid I answer your question? Mark my post as a solution!