We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
¡Hola a todos! ¿Cómo se convierte este querry en DAX?
Quiero estandarizar queuries y esperaba que fuera posible tener este como una medida / tabla (s).
CON cte_elevation AS (
seleccionar well_id, SUM(datum_elevation) * -0.3048 AS elevación
de CD_DATUM
donde is_default 'Y'
grupo por well_id
)
,cte_plan AS (
SELECT wp.well_id, 'Plan' como Tipo, (wp.md_to * -0.3048) + elevación COMO Profundidad
,cast(sum(isnull(wp.target_duration,0)) over (partición por orden wp.well_id por cast(step_no as smallint)) como horas
,cast(step_no como int) AS OrderBy
DE dbo. DM_WELL_PLAN_OP wp
UNIRSE a cte_elevation e ON wp.well_id e.well_id
DONDE target_duration no es nula
Y md_to no es nula
)
,cte_actual AS (
SELECT d.well_id, Tipo AS 'Real', (d.md_current * -0.3048) + e.elevation AS Depth
,isnull(days_on_location,0) * 24 como horas
,CAST(date_report como int) AS OrderBy
DE dbo. DM_DAILY d
UNIRSE a cte_elevation e ON d.well_id e.well_id
)
SELECCIONAR * DE cte_plan
UNION ALL
SELECCIONAR * DE cte_actual
@Alex_0201 , Ver si este blog puede ayudarle a construir este
https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.