tag:blogger.com,1999:blog-85577282832870850502024-03-05T22:59:18.375-05:00Flerlage Twins en EspañolAnálisis, Visualización de Datos y TableauKen Flerlagehttp://www.blogger.com/profile/03698843288892226027noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-8557728283287085050.post-35814829158906408862020-09-28T08:26:00.002-04:002020-09-28T10:01:42.353-04:00El Orden de Operaciones de Tableau<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyT456sJYFfZ_3PyBetlHq1uKe-XyNkBYGV_Tf1lK4PgzEvI1-DlhwdLdm909aWjL2Y_WYqt5CPr-RrkxJu-lN6mto1VORcAMP6JGFXXnMSkUdOzREbkHlmT_uWJK3U9jqojkjgcK6U25m/s2048/Heading.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1303" data-original-width="2048" height="408" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyT456sJYFfZ_3PyBetlHq1uKe-XyNkBYGV_Tf1lK4PgzEvI1-DlhwdLdm909aWjL2Y_WYqt5CPr-RrkxJu-lN6mto1VORcAMP6JGFXXnMSkUdOzREbkHlmT_uWJK3U9jqojkjgcK6U25m/w640-h408/Heading.png" width="640" /></a></div><p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><i><span style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"><a href="https://www.flerlagetwins.com/2020/09/order-of-operations.html">Click here to read in English.</a></span></i><i><span style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span></i></p><p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><i><span style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"><br /></span></i></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><i><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Nota: No hablo español.
He usado varias herramientas para traducir esto del inglés al español, así que
es probable que mi gramática sea imperfecta. Sin embargo, espero que sea
legible y comprensible. Quiero dar un gran agradecimiento a </span></i><span lang="ES-MX"><a href="https://twitter.com/nereacid1"><i><span style="color: #1155cc; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Nerea Cid</span></i></a></span><i><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">, Jefe de Analítica de CHECK24 Vergleichsportal GmbH, por su
retroalimentación y ayuda en el ajuste de la traducción.</span></i></p><p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><i><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"><br /></span></i></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">En mi opinión, </span><span lang="ES-MX"><a href="https://help.tableau.com/current/pro/desktop/es-es/order_of_operations.htm"><span style="color: blue; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">el
orden de las operaciones </span></a><a href="https://help.tableau.com/current/pro/desktop/es-es/order_of_operations.htm"><span style="color: blue; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">en</span></a><a href="https://help.tableau.com/current/pro/desktop/es-es/order_of_operations.htm"><span style="color: blue; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">
Tableau</span></a></span><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> es un tema con el
que todos los usuarios de Tableau deben estar íntimamente
familiarizados. Si no comprendes el orden de las operaciones, te
sentirás constantemente frustrado al intentar solucionar un problema que no
funciona como esperaba. <o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Por ello, en este blog, voy a presentar brevemente el Orden de
operaciones y cada uno de sus componentes y compartiré cinco
problemas comunes con el Orden de operaciones, junto con cómo abordarlos.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 22pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">¿Qué es el Orden de
Operaciones?</span></b><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">El orden de operaciones en Tableau es similar al
orden de operaciones en matemáticas, que todos aprendimos al principio de
nuestras carreras escolares. ¿Lo recuerdas?—primero vienen los elementos
entre paréntesis, luego las potencias, luego la multiplicación y la división,
seguida de la suma y la resta. <o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">El orden de operaciones de Tableau es bastante similar, lo que
indica el orden entre las distintas operaciones en Tableau —filtros, campos
calculados, y otras funciones de Tableau —ejecución y / o de
cálculo. Aquí está el orden de operaciones de Tableau.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="1303" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb0z9wdzAlKBjKbXmuF6sn-JMq2gWrKUkIP_kfcEZLbs12sgN91FsIArvGAEGFD7kBEjmkgjICGr0K4uPjI2trGurZTlQqz9jqFpMA72vf7DQAduPIcfvKsj-krU9wO30mZgqbBKMzXn4Z/s16000/OOO.png" /></div><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><a href="https://translate.google.com/translate?hl=en&prev=_t&sl=en&tl=es&u=https://help.tableau.com/current/pro/desktop/en-us/order_of_operations.htm"><span style="color: blue; font-family: "Palatino Linotype",serif; font-size: 9pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Orden
de operaciones de Tableau</span></a></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">A la izquierda, podemos ver los principales tipos de filtros y,
a la derecha, podemos ver otros tipos de funciones de Tableau, como cálculos de
LOD (nivel de detalle), cálculos de tablas, totales y líneas de
referencia. El orden fluye de arriba hacia abajo. Es importante tener
en cuenta que el orden de operaciones no incluye todas las funciones de
Tableau. Por ejemplo, el estante Páginas no está incluido (si desea
que Tableau cree un Orden de operaciones más detallado, vota a favor de lo
siguiente: </span><span lang="ES-MX"><a href="https://community.tableau.com/s/idea/0874T000000H9zbQAC/detail"><span style="color: blue; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Documentación
mejorada del Orden de operaciones</span></a></span><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">).
Sin embargo, incluso sin todos los componentes, el gráfico es una herramienta
bastante útil para comprender cómo funciona Tableau y es particularmente útil
cuando se está solucionando un problema.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">No voy a explicar cada una de estas características en detalle,
pero repasemos rápidamente el orden. Como podemos ver, la primera
característica que se calcula son los <b>Filtros
de Extracción</b>,<b> </b>seguidos de
los <b>Filtros de Fuentes de
Datos </b>(si quieres saber más sobre la diferencia entre estos dos
filtros, consulta esta gran discusión </span><span lang="ES-MX"><a href="https://community.tableau.com/s/question/0D54T00000CWcdaSAD/difference-between-extract-filters-and-data-source-filters"><span style="color: blue; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Diferencia
entre filtros de extracción y filtros de origen de datos</span></a></span><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">).</span></p><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1iTbQT2UCrde3WLbdheezDctNvxfd8lJIcX95Dq3tKysPpiN65Xb5JJU5jI8DNer1JNMD29FXPTUq5zaSM7ry0ogWO5DZCsz61pR1eXUS10lDTWZ6f9DWp8wfTfD8-VD2yK9GurmqmPac/s2048/Data+Source.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1303" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1iTbQT2UCrde3WLbdheezDctNvxfd8lJIcX95Dq3tKysPpiN65Xb5JJU5jI8DNer1JNMD29FXPTUq5zaSM7ry0ogWO5DZCsz61pR1eXUS10lDTWZ6f9DWp8wfTfD8-VD2yK9GurmqmPac/s16000/Data+Source.png" /></a></div>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Los siguientes por orden son los <b>Filtros de Contexto, </b>seguidos de los <b>Conjuntos (Sets), Filtros Condicionales, Filtros de N Principales, </b>y
expresiones de <b>Nivel de Detalle (LOD)
Fixed, </b>seguidos de los <b>Filtros
de Dimensión. </b>Como veremos en la próxima sección de <b>Problemas Comunes, </b>aquí es donde a
menudo comenzamos a ver una variedad de problemas con el orden de
operaciones. Esto se debe a que debemos pensar detenidamente si queremos
que nuestro filtro se aplique antes o después de cosas como los filtros N
Principales y los LOD Fixed. Aquellos filtros que necesitan computar <i>antes </i>deberán convertirse a filtros
de contexto. Aquellos que necesitan computar <i>después </i>pueden seguir siendo filtros de dimensión (el
predeterminado).</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="1303" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsg1cZqYEonCB3xnA5Qu0O0R7bLEXqsowiwMOIIk-u9zduIlqUVK8De6n_GNMBvvemy_S1KL9Sa62uMchqgBIIas3aGKfHRu4OLAnWGOJB33356SG_77W-R9LRy2Y1dI-dr8OWU_ipVNvN/s16000/Context.png" /></div>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">A continuación, tenemos <b>Nivel de Detalle (LOD) Include/Exclude </b>y<b> Combinación de Datos (Blending). </b>Si bien podría parecer que
tendríamos problemas similares con los LOD de Include/Exclude que con los LOD
Fixed, esos problemas son mucho menos pronunciados, ya que se calculan
después de los filtros de contexto y los filtros de dimensión. Por lo
tanto, el hecho de que utilice un filtro de contexto o dimensión tiene poco
efecto sobre cómo se calculan los LOD de Include/Exclude. Dicho esto, como
veremos a continuación, podemos convertir nuestros LOD Fixed en LOD de
Include/Exclude para engañar al orden de operaciones.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">A continuación, tenemos los <b>Filtros de Medida, </b>que en mi experiencia no suelen causar
muchos problemas con el orden de operaciones.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Luego tenemos <b>Pronósticos,
Cálculos de Tabla, Clústeres</b>,<b> </b>y<b> Totales, </b>seguidos de <b>Filtros de Cálculos de Tablas. </b>Esta es
otra área en la que comenzamos a encontrarnos con algunos problemas de orden de
operaciones. Como veremos más adelante, esto se debe en gran medida a la
naturaleza de los cálculos de las tablas y a cómo se calculan. </span><span style="color: #404040; font-family: "Palatino Linotype", serif; font-size: 14pt; text-align: center;"> </span></p><p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span style="color: #404040; font-family: "Palatino Linotype", serif; font-size: 14pt; text-align: center;"><br /></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="1303" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrC6pIQ87jn0MuyQYm-ry58Uzm7AiZm2S2jiDlzpiHXWtgD6IrYHBeFZ1GT5gqDG9Sut5T7sDI3DNaojSsCoboq0kT3g6Z9GVbDLH5lakYaDzt42S1yD0LtrYOqWqGshB1bUU3hr-LiZ6p/s16000/Table+Calc.png" /></div>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Por último, los últimos elementos en el Orden de Operaciones son
<b>Líneas de Tendencia</b> y <b>Líneas de Referencia</b>. Estas siempre se
calcularán como último elemento. </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 22pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Problemas Comunes con
el Orden de Operaciones</span></b><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Ahora que presentamos el Orden de operaciones, hablemos de
algunos de los problemas más comunes de Orden de operaciones. Para ser
claros, estos no son los <i>únicos </i>problemas
que encontrarás, pero en mi experiencia, tienden a ser cosas con las que
tenemos que lidiar con bastante regularidad.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 17pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">1) Filtros de Dimensión
y Contexto con LOD Fixed</span></b><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Comencemos con un ejemplo con los datos de muestra de Tableau “Supertienda”. Tenemos
una lista de clientes en la que algunos han hecho varios pedidos y queremos
saber la fecha del primer pedido de cada cliente. Para ello, primero
creamos una expresión de nivel de detalle (LOD) Fixed con la cual podemos
obtener la fecha del primer pedido.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><u><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Fecha Primer Pedido</span></u></b><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #898989; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">// Consigue
el primer pedido para el cliente. </span><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">{FIXED </span><span lang="ES-MX" style="color: #de7830; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">[Nombre
del cliente]</span><span lang="ES-MX" style="color: #335f8b; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">: </span><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">MIN</span><span lang="ES-MX" style="color: #335f8b; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">(</span><span lang="ES-MX" style="color: #de7830; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">[Fecha del pedido]</span><span lang="ES-MX" style="color: #333333; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">)</span><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">}</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Luego, creamos una vista que muestra a cada cliente con la fecha
de su primer pedido.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="784" data-original-width="1128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzpVgkM9JRHRf6-STh_YPWYNl3B5rKJl557Xv1E-FHECPC3fqo33pab4JH9aSjWzdj4KxK-7opTJ2JgOukSGOPGMrpHxpXkQkdtOx_AXLEpw6HNwYndOEiG6Wykw-JIJfTkX84mpmhU7sg/s16000/Fixed+LOD.png" /></div><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Esto funciona muy bien, pero ¿qué sucede si se desea aplicar
algunos filtros? Por ejemplo, filtremos por <b>Categoría </b>y seleccionemos solo <b>Mobiliario </b>y <b>Tecnología.</b></span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="784" data-original-width="1128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXRFGEiZlta_tAOSVdLCwKGumtLwHgrWHYvlz4f_VmZ-PcUZM_UcKsrqVl6cG_ZixIYqjRhlVjHC0H6rXzFBkroHvPA5YAHOd-r65Prmhocjo9HLpdxx16DEENt7fHqafxj4kuUWyaubP1/s16000/Fixed+LOD+2.png" /></div><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Era de esperar que Tableau nos muestre las fechas del
primer pedido solo para esas dos categorías, pero como puede ver
arriba, las fechas permanecen sin cambios. <o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Entonces, ¿qué está pasando aquí? Desglosémoslo en términos
del orden de operaciones. Tenemos un Filtro de Dimensión en <b>Categoría </b>y tenemos una expresión
LOD Fixed.</span></p><p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"><br /></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="1303" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcBTUn_d6djgxxyzbseCi5wPuX4CHaNbusJcPQQbKl51pGyiIj5Ngc6qtKuYDURVao3aagpU25PPo2efX9yromT6EsCPP-XVliCOF5IPERJRkDFaVckLl8zxn9SdgajrP4U7crQtMOAvCd/s16000/Dimension+Filter.png" /></div><p align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0in; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Como podemos ver, la LOD Fixed viene antes que el filtro de
dimensión. Por lo tanto, la se LOD calcula primero, encontrando la fecha
general del primer pedido para cada cliente. Sólo después de
que Tableau haya calculado la fecha del primer pedido, filtra la
vista. Por eso las fechas no cambian. Para ser claros, el filtro de
dimensión no es totalmente inútil en este caso sino que eliminará a cualquier
cliente que no haya comprado ningún mueble o tecnología. El problema es que simplemente
no tendrá ningún impacto en las fechas.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Si queremos forzar el cálculo del filtro <i>antes </i>del LOD, necesitamos
cambiarlo a un filtro de contexto. Podemos hacer esto haciendo clic
derecho en el filtro y eligiendo "Añadir a contexto". Notarás la
diferencia visualmente ya que los filtros de contexto se muestran como píldoras
grises.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="1303" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIi9DbVBZ6ZIFZJmqGUNn88Wz79hpbr6yhmuw13w_2xI38o626ImH7dQoA29Logev5GfU8_9Q9z6uiyCaKSlgkFHwaeZPgJI26FYuLmlygNbB9sPMdlS9wldDsfxHyOb67MzJ0d4gzZw43/s16000/Context+Filter.png" /></div><p align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0in; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Como ahora es un filtro de contexto, se calculará antes de la
LOD, por lo que cambian los valores de la Fecha del Primer Pedido.<o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="784" data-original-width="1128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdpgLt6CArmfGPOiHUUYdJqHnIP7k8mnsltXSDJFaATBRqa-XMz5hMfbD9t82eXGkQH8ybEkaVTWzHPftMwwqlPeKIVGPlBurCuhfAryrOG6rMpwr1159GF6UeLHwH-GywcwsGppo-weHb/s16000/Fixed+LOD+3.png" /></div><p align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0in; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Este es, en mi opinión, probablemente el problema de orden de
operaciones más común, por lo que es realmente importante comprender cómo
funcionan los filtros de dimensión y contexto con LOD Fixed.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 17pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">2) Fixed, Exclude,
y Include LOD… ¡¡Oh, Dios Mío!!</span></b><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">A veces te puedes encontrar en una situación en la que necesitas
un solo filtro para calcular antes de una LOD pero después de otra.
Esencialmente, necesitas este filtro para actuar como un filtro de contexto en
algunos casos y un filtro de dimensión en otros. Desafortunadamente, un
filtro solo puede ser uno u otro, por lo que nos encontraremos en un
aprieto de Orden de operaciones. Por ejemplo, tomemos nuestra vista desde
arriba y agreguemos un requisito más. Deseamos comparar las ventas máximas
de cada cliente para las categorías seleccionadas (basadas en el filtro) con
las ventas máximas para todas las categorías. Ambos campos calculados usarán el
mismo LOD:<o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><u><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Ventas Máximas - Filtrado <o:p></o:p></span></u></b></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #898989; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">// Máximas
ventas para el cliente. <o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">{FIXED </span><span lang="ES-MX" style="color: #de7830; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">[Nombre del cliente]</span><span lang="ES-MX" style="color: #335f8b; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">: </span><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">MAX</span><span lang="ES-MX" style="color: #335f8b; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">(</span><span lang="ES-MX" style="color: #de7830; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">[Total]</span><span lang="ES-MX" style="color: #333333; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">)</span><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">}</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><u><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Ventas Máximas - Todos <o:p></o:p></span></u></b></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #898989; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">// Máximas
ventas para el cliente. <o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">{FIXED </span><span lang="ES-MX" style="color: #de7830; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">[Nombre del cliente]</span><span lang="ES-MX" style="color: #335f8b; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">: </span><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">MAX</span><span lang="ES-MX" style="color: #335f8b; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">(</span><span lang="ES-MX" style="color: #de7830; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">[Total]</span><span lang="ES-MX" style="color: #333333; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">)</span><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">}</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Sin embargo, queremos que el filtro de <b>categoría se </b>calcule <i>antes de las </i><b>Ventas Máximas - Filtrado, </b>pero <i>después de las </i><b>Ventas
Máximas - Todos. </b>Esto simplemente no es posible porque, como señalamos
anteriormente, un filtro no puede ser tanto un filtro de dimensión como un
filtro de contexto.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Entonces, ¿cómo abordamos esta necesidad? Bueno, en primer
lugar, necesitaremos cambiar el filtro de contexto a un filtro de dimensión
porque no hay tipos de LOD que se puedan calcular antes que los filtros de
contexto. Ahora que nuestro filtro es un filtro de dimensión, ambos LOD se
calcularán antes que el filtro, dándonos los mismos valores.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="784" data-original-width="1128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXoLnJILTkzpP0JmuY_8DhQebK8uKih9aQbRHg9Y8Rj4XX-h4r_F6XYfYE0Mjfo9rPhuGY6AS0EQNOBp5HYMs77DVLmdzBbh-rxTNwWG8rzaZzZGJ_toLmXUSJjXt4-qXcc6P31DMWIxUp/s16000/IE+1.png" /></div><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Pero tenemos que encontrar una manera de mover <b>Ventas Máximas - Filtrado</b> en
la Orden de Operaciones por lo que calcula <i>después </i>el filtro. Podemos hacer
esto de dos formas. Podemos o bien cambiar el cálculo de usar un LOD
incluir o excluir o podemos cambiarlo para utilizar una Cálculo de Tabla ya
que todos estos cómputo después de los filtros de dimensión.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="1303" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM3aXjiT155LEHntjzXI4Go2Q6oqBVpieiZfantxLpiDmE58HfI72-gohkSKJ79ZsfFeGGcyQ19LBrsMISUkAna65wTAlszMbqaYi0vZNmw9x8BzNvl6llcHrW0N91FDGav93nlIPYxX_U/s16000/01.png" /></div><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Aquí hay un LOD Exclude que debería funcionar:</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><u><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Ventas Máximas – Filtrado<o:p></o:p></span></u></b></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #898989; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">// Ventas
máximas para el cliente (LOD Exclude).<o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">{EXCLUDE </span><span lang="ES-MX" style="color: #de7830; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">[Fecha Primera Orden]</span><span lang="ES-MX" style="color: #335f8b; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">: </span><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">MAX</span><span lang="ES-MX" style="color: #335f8b; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">(</span><span lang="ES-MX" style="color: #de7830; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">[Total]</span><span lang="ES-MX" style="color: #333333; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">)</span><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">}</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Y el cálculo de la tabla se vería así:</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><u><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Ventas Máximas - Filtrado</span></u></b><u><span lang="ES-MX" style="color: #898989; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";"> <o:p></o:p></span></u></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #898989; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">// Ventas
máximas para el cliente (cálculo de tabla)</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">WINDOW_MAX</span><span lang="ES-MX" style="color: #404040; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">(</span><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">MAX</span><span lang="ES-MX" style="color: #404040; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">(</span><span lang="ES-MX" style="color: #de7830; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">[Total]</span><span lang="ES-MX" style="color: #404040; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">))</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Mientras que algunas de las ventas máximas filtradas coincidirán
con las ventas máximas totales (porque las ventas máximas para estos clientes
fueron para Muebles o Tecnología), podemos ver algunos casos en los que
difieren, lo que indica que nuestros cálculos funcionaron.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="784" data-original-width="1128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoburpvy7smzjMqLQTZIkObhRTmrEHbUsSXZoXzu27KjsF_TLYBZZ2LtEfOrHkjUh8wrrpT5-ZDIb9fBRmxXK_rCaniAK1brP2GqHrVeUTxxM0Te1VVE78SKdqr8TkhDEfYt0AQyaesRwt/s16000/IE+2.png" /></div><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 17pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">3) Filtros de Dimensión
y Contexto con Filtros N Principales</span></b><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">En el número 1, abordamos los problemas con filtros de
dimensión, filtros de contexto y LOD Fixed. El tercer problema que
abordaremos es similar, pero aborda los filtros N Principales (Top N) en lugar
de las expresiones LOD Fixed.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="1303" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIgw41pKOT3EKJOpDxB-VkzQTD0pbx0v1hy4rlHHYegyILVbB-5LbhYRfkvDn_1nWBQR9tb00rWLLtg0EOxKAYONTTnfTSxGgGNkUs6VCjzmj0TiuH1BcfrmiudJkhn40-9G0VLZ6nyzSg/s16000/Context.png" /></div><p align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0in; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Para este ejemplo, crearemos una vista que muestre los 15
clientes principales por ventas. Lo hemos hecho creando un filtro N
Principales arrastrando el <b>nombre
del cliente </b>a la parte de Filtros.<b> </b>También
tenemos un filtro de dimensión en el <b>año </b>de la <b>fecha
del pedido.</b></span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="784" data-original-width="1128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiROVLwll9oPTiVkbkKNjFIQ9nu2T0X7p-AB-PPir0VPWnknqwUkhy82rMI8HrYwa-g3_udfYkGPNIz9Ehdyv0KBKa-NtmNNQ3ZLCyOOjR4hj863hwmVBOm99L25MQl79rDTUG758MISwLo/s16000/Top+N+1.png" /></div><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">En este caso, nuestro valor de <b>Ventas </b>es solo una agregación normal; no estamos usando ninguna
LOD, por lo que están fuera de la imagen.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Esto funciona muy bien—podemos ver de forma muy simple a
nuestros 15 clientes principales. El problema aparece cuando seleccionamos
solo el año 2017, nuestro filtro N Principales parece que se rompe ya que ahora
sólo tenemos el top 12.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="784" data-original-width="1128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-GM8gSDvE3ycp8KEAiS3r4W5LGRvuFIrjD3kOps09Tp-tBP3-kOEueFsO8tQKGeVhoBCWpHx97jD6GUrq5minHxTa3cWM9MkDntQe2H97WCATGtjkPiNOwINoOlr0dxr8lPJVhS-9vF-R/s16000/Top+N+2.png" /></div><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Entonces, ¿qué está pasando aquí? Una vez más, veamos el
orden de operaciones y desglosémoslo. Tenemos un filtro N
Principales y un Filtro de Dimensión como se muestra a continuación.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="1303" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRIiYaZT625a9tMJBCmj4qP6pVWdS4CrEvpcE-hSRTbyLWgQ3JMSrBSxJS9Z04YcO2qFWQBQmaqmpu8Av8UhGGPuXOy3LT-rydwcKy647QjjHbZ2q3XNXqKLl-gAa8Ep7juVYi598QnAAi/s16000/Dimension+Filter.png" /></div><p align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0in; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Pero, como podemos ver, el filtro N Principales calcula <i>antes que </i>el filtro de
dimensión. Así, Tableau es conseguir primero la parte superior general del
15 de toda la información conjunto. Una vez que se calcula entre
los 15 primeros, se aplica el filtro Año. En este caso, 3 de nuestros 15
principales no tuvieron ventas en 2017, por lo que se eliminan de la vista,
dejándonos con solo 12.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Si queremos asegurarnos de que nuestro filtro N Principales
calcule <i>después de </i>nuestro
filtro Año, entonces la solución es la misma que en el # 1. Simplemente
agregamos el filtro Año al contexto.</span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="784" data-original-width="1128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7gKpKXW2xDghIeKnQFz3xydTL2k603rxZPEm5t_xBmW9r4MtMqisNSNTbcaJRu5kwbTVQgPtMUp2woj0xcg8PmBb7JJRjUPdkuX1zCy4ZTF1N0Egu2FI3nej0ac0gwm0YhHbjmlISlzln/s16000/Top+N+3.png" /></div><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Nota: Es posible agregar un filtro N Principales al contexto,
convirtiéndolo en un filtro de contexto y un filtro N Principales. En este
caso, se computará como un filtro de contexto, antes de los LOD Fixed, otros
filtros N Principales, etc.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 17pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">4) Index vs N
Principales</span></b><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Este no es tanto un problema como algo que me gustaría
señalar. A menudo veo personas que usan INDEX para mostrar los N
Principales. Para usar el ejemplo del número 3, podríamos crear un campo
calculado INDEX() y luego usarlo como filtro, manteniendo los valores
1-15. </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0in; text-align: center;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="784" data-original-width="1128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQiNM1pdQQygNuBuVyXg6MKnIkxp1asEX9h4xIiwx5zs0MWKEfqg-oecJOWRKn_vamkQDE2YBXSt728HZPBYxiWgIFAWVd4w9hHQXL14owmy5fPSbSt1t3ZRQtDB9-mIvtXRiqE6cQQXpU/s16000/Index+1.png" /></div><p align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0in; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">En este caso, no importaría si el filtro Año se trata de un
filtro de contexto o un filtro dimensión (Nota: Esto podría afectar al
rendimiento, pero no afectará a la funcionalidad). Esto se debe a que el
filtro de INDEX es un filtro de cálculo de tabla, que se calcula casi
al final del Orden de operaciones sólo por delante de las líneas de tendencia o
referencia.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="1303" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVLlMEDTYCvlZ0ILrzlrBTW8GUFE7OwrGDVtzNl2GBgtbiVMQlN_AK1SUI2Xj3s-fQ4ZLgX64MgyCaYidaaMcMmGroQIVZs78AsjQ-HUY2wW9fgI_H-Q6-reqTvnMwbE4sb9coAFd1ICgm/s16000/TC+1.png" /></div><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Entonces, ¿cuándo debería usar un filtro N Principales frente a
INDEX? Como es casi siempre el caso, depende—de qué otros tipos de filtros
y características se están utilizando en su vista, cuando se desea que el
filtro se compute, etc. Mi recomendación general es usar un filtro N
Principales como predeterminado ya que estos tienden a ser más sencillos y no
vienen con las complejidades inherentes de los cálculos de tablas. Pero,
cuando sea necesario, INDEX puede ser una gran opción para realizar un filtro N
Principales.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 17pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">5) Cálculos de Tabla y
Filtros de Cálculos de Tablas</span></b><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Ya que estamos en el tema de los cálculos de tablas, mi último
problema común de Orden de operaciones tratará con estas bestias. Para
este ejemplo, he creado una hoja de trabajo que clasifica cada ciudad/estado
por ventas usando un cálculo simple de RANK.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="784" data-original-width="1128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivN945hhg8TiofwtMc97E7gB-ktPUFwFxbJYaQsBp8SQXg5Vr7H6AEdtHx16jyu0B0jCSYc8kgT4T3SSGLGy9uGaQwq0pYHrQ26w410WmpaikRuwaD0n2gCumcCimyT-g5xnRETULoO9_R/s16000/Rank+1.png" /></div><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Lo que queremos es poder filtrar esto por estado, pero aún así
ver los rangos nacionales. Si simplemente filtramos por Estado, entonces el
rango se recalcula como se muestra a continuación.<o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="784" data-original-width="1128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR8PaB5UMiiKgsgsbFQapMaTZxdONqWfx1dBohML2ChLMUU1Be0V_VADIEx4Cd8jzaRdDHsoZGhGcKQUDxtdm-0vcJHtWjq443XHJN9mchTKdpm66XEGHG9M9OcCXI77DEbdEQAU7TeE-R/s16000/Rank+2.png" /></div><p align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0in; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Esto, por supuesto, se debe al orden de operaciones.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="1303" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1Qw-R8EnCHEnqe4PXWITXnQZRhDWhgSDZ6m2RKf4Lm0fwEt1ktoK-mwnh5hLqIsf5FNoBWM2rW7W0DJEm80m3kaSVCtwMCc_d3ocS7NVVDiZ0sbv25-3V8dJQdP5RaQAEOJQ-1395Wj1Z/s16000/TC+2.png" /></div><p align="center" class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Los cálculos de tabla se calculan <i>después de </i>los<i> </i>filtros
de dimensión, por lo que la vista se filtra primero y luego se calcula la
clasificación. Entonces, ¿cómo nos aseguramos de conservar la
clasificación general original, mientras filtramos la vista? Para hacer
esto, necesitamos que el filtro de estado se calcule <i>después </i>del cálculo de la tabla. Y el único filtro que se
calcula después de los cálculos de tabla son los filtros de cálculo de
tabla. Entonces, si de alguna manera podemos forzar a nuestro filtro de
estado a ser un filtro de cálculo de tabla, esto debería funcionar. Para
hacer esto, podemos usar un truco que aprendí de la increíble </span><span lang="ES-MX"><a href="https://twitter.com/drexelpooja?lang=es"><span style="color: blue; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Pooja
Gandhi</span></a></span><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">. Podemos usar LOOKUP
con un desplazamiento de 0 como se muestra a continuación.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><u><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Estado TC<o:p></o:p></span></u></b></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #898989; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">// El estado
de fuerza será una tabla de cálculo...<o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #898989; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">// ...para
que se calcule después del rango.<o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; margin: 0in 0in 0in 0.5in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">LOOKUP</span><span lang="ES-MX" style="color: #555555; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">(</span><span lang="ES-MX" style="color: #3b6ea2; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">MAX</span><span lang="ES-MX" style="color: #555555; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">(</span><span lang="ES-MX" style="color: #de7830; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">[Estado]</span><span lang="ES-MX" style="color: #555555; font-family: "Courier New"; font-size: 15pt; mso-fareast-font-family: "Courier New";">), 0)</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Entonces podemos usar esto como nuestro filtro.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="784" data-original-width="1128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrgpGbtsKHc7xUXDA8dTjR8i1_GeRLWrAvq4gof0BO5C-a1zPVAwivmfMMFwT_rERLxn1WEjMW4ObbHw89nTrxrC3bgY44JlZrKXFuE9jvW494IOtL1aKB9mTX91l4uZ9ria_HgMjbTp7V/s16000/Rank+3.png" /></div><p align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0in; text-align: center;"><br /></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Debido a que los filtros de cálculo de tabla se
calculan <i>después de </i>los
cálculos de tabla, primero se calcula la clasificación y luego se filtra la
vista, lo que nos permite mantener la clasificación general de cada ciudad.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Este es uno de mis trucos favoritos de todos los tiempos; es
posible que incluso lo veas en un próximo blog de consejos. Puede parecer
algo que sólo se usaría en situaciones raras, pero en realidad me encuentro
usando esto todo el tiempo para engañar a la Orden de Operaciones y hacer que
Tableau haga cosas asombrosas.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Y este truco de LOOKUP es solo un ejemplo en el que podemos usar
los filtros de cálculo de tabla de esta manera. No mostraré esto en
detalle, pero un escenario común es donde podría estar usando un
cálculo de tabla para mostrar el cambio año tras año, pero sólo se desea
mostrar el último año. Los cálculos de tabla, para que se calculen
correctamente, requerirán que tenga el año anterior en la vista. Sin
embargo, podemos utilizar la tabla Calc Filtros, utilizando funciones tales
como LAST para filtrar los años innecesarios <i>después de </i>la calc tabla se ha calculado.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><b><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 22pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Y Eso Es Todo, Amigos</span></b><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Comprender el orden de operaciones de Tableau es absolutamente
fundamental para obtener un conocimiento profundo y un dominio de
Tableau. Sin este conocimiento, te encontrarás constantemente confundido
acerca de por qué el software está haciendo lo que está haciendo. Pero,
una vez que comprenda el orden de las operaciones, podrás hacer que Tableau
haga casi cualquier cosa que puedas imaginar.</span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> </span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Aunque sólo os he mostrado un par de ejemplos concretos en este
blog, espero que podáis imaginar cómo podríais aplicar estas técnicas básicas a
vuestro propio trabajo, aunque vuestros escenarios no sean exactamente los
mismos que he mostrado. Además, es importante señalar que mis ejemplos sólo han
arañado la superficie. Mi objetivo era mostrarle algunos de los problemas más
comunes del Orden de Operaciones que he encontrado personalmente. Pero hay
muchos otros escenarios que seguramente encontrarás en tu trabajo. Dicho esto, te
aseguro que si aprendes el Orden de Operaciones y cómo aplicarlo, no hay casi
nada que no puedas superar.</span></p><p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span style="color: #404040; font-family: "Palatino Linotype", serif; font-size: 14pt;"><br /></span></p><p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span style="color: #404040; font-family: "Palatino Linotype", serif; font-size: 14pt;">Como siempre, gracias por leer este blog y no dudes en compartir
tus pensamientos en la sección de comentarios a continuación.</span></p><p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span style="color: #404040; font-family: "Palatino Linotype", serif; font-size: 14pt;"><br /></span></p><p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span style="color: #404040; font-family: "Palatino Linotype", serif; font-size: 14pt;">Ken Flerlage, 28 de septiembre de 2020</span></p>
<p class="MsoNormal" style="border: none; line-height: normal; margin-bottom: 0in; mso-border-shadow: yes; mso-padding-alt: 31.0pt 31.0pt 31.0pt 31.0pt;"><span lang="ES-MX"><a href="https://twitter.com/flerlagekr/?lang=es"><span style="color: blue; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Twitter</span></a></span><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> | </span><span lang="ES-MX"><a href="https://www.linkedin.com/in/kennethflerlage/"><span style="color: blue; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">LinkedIn</span></a></span><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> | </span><span lang="ES-MX"><a href="https://github.com/flerlagekr"><span style="color: blue; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">GitHub</span></a></span><span lang="ES-MX" style="color: #404040; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";"> | </span><span lang="ES-MX"><a href="https://public.tableau.com/profile/ken.flerlage"><span style="color: blue; font-family: "Palatino Linotype",serif; font-size: 14pt; mso-bidi-font-family: "Palatino Linotype"; mso-fareast-font-family: "Palatino Linotype";">Tableau Public</span></a></span><span lang="ES-MX" style="font-family: "Times New Roman", serif; font-size: 13.5pt;"><o:p></o:p></span></p>
<p> </p>Ken Flerlagehttp://www.blogger.com/profile/03698843288892226027noreply@blogger.com0tag:blogger.com,1999:blog-8557728283287085050.post-34606452348321828222020-08-02T13:50:00.003-04:002020-08-02T13:51:08.102-04:00Un Experimento con Español<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-F1zDt8QpjSfhgmxnFd1JAmQMLrJk6RV2dG2UApOWI_xzAxu5rPLmBv8_lRzwt43AM14Q8366_sOraZpopqu2_5Ui7UuNX9YdU37goH0j10i_0iJGztb4NtWQ0_uhERR935TKFIoHRVqw/s1600/heading.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="945" data-original-width="1600" height="378" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-F1zDt8QpjSfhgmxnFd1JAmQMLrJk6RV2dG2UApOWI_xzAxu5rPLmBv8_lRzwt43AM14Q8366_sOraZpopqu2_5Ui7UuNX9YdU37goH0j10i_0iJGztb4NtWQ0_uhERR935TKFIoHRVqw/s640/heading.png" width="640" /></a></div>
<br />
<div style="background: white; margin: 0in;">
<i><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">Scroll down for an English version.<o:p></o:p></span></i></div>
<div style="background: white; margin: 0in;">
<br /></div>
<div style="background: white; margin: 0in;">
<span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">Amo mucho a la comunidad de Tableau. A través de esta comunidad, he mejorado mis habilidades de Tableau, he aumentado mi red profesional y he encontrado muchos amigos de por vida. Debido a mi propia experiencia con la comunidad, siempre quise ayudar a ampliarla y diversificarla. Una cosa, en particular, que he querido es encontrar una manera de aumentar la diversidad geográfica de la comunidad, ya que siento que hay grandes oportunidades para ayudar a las personas a "ver y comprender los datos" en todo el mundo.</span></div>
<a name='more'></a><br />
<div style="background: white; margin: 0in;">
<br /></div>
<div style="background: white; margin: 0in;">
<span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">Como copropietario de un popular blog de Tableau, se me ocurrió que una forma de hacerlo sería proporcionar nuestros blogs en diferentes idiomas. Descubrí que la mayoría de los blogs de Tableau tienden a estar escritos en inglés y creo que existe la oportunidad de proporcionar blogs en otros idiomas. Si bien hay 379 millones de hablantes nativos de inglés en el mundo y millones más que hablan inglés como segundo idioma, todavía hay muchas personas que hablan y leen poco o nada de inglés. Hay 1.300 millones de hablantes nativos de chino (917 millones hablan mandarín) y 460 millones de hablantes nativos de español (</span><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;"><a href="https://www.babbel.com/en/magazine/the-10-most-spoken-languages-in-the-world" target="_blank"><span lang="ES-MX">The 10 Most Spoken Languages In The World</span></a></span><span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">). Hace mucho que admiro a Rosario Gauna y el hecho de que ella mantiene un blog bilingüe, escribiendo tanto en español como en inglés. Entonces, ¿qué pasaría si pudiera encontrar una manera de hacer algo similar y traducir nuestros blogs al chino y / o español para ayudar a los usuarios de Tableau en estas comunidades?<o:p></o:p></span></div>
<div style="background: white; margin: 0in;">
<br /></div>
<div style="background: white; margin: 0in;">
<span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">Desafortunadamente, esto tiene algunos desafíos bastante significativos. En primer lugar, no hablo ningún otro idioma. Vivo en una parte de los Estados Unidos donde puedo conducir cientos (o incluso miles) de millas en cualquier dirección y solo encuentro hablantes de inglés (con algunas excepciones, como Quebec) y mis dos años de español en la escuela secundaria, desafortunadamente, realmente no se apoderó. Eso nos deja encontrar un servicio para la traducción, pero estos tienden a costar dinero y realmente no tenemos el presupuesto para eso. Nuestro blog es algo que hacemos de forma gratuita. Kevin y yo no ganamos dinero con eso, ni siquiera alojamos anuncios. Entonces, pagar por un servicio no es realmente una opción viable. Otro problema es que gran parte de nuestro contenido es altamente técnico y de naturaleza específica de Tableau. Por lo tanto, incluso si pudiéramos encontrar una persona o un servicio que fuera asequible, esa persona aún necesitaría algún conocimiento de Tableau.<o:p></o:p></span></div>
<div style="background: white; margin: 0in;">
<br /></div>
<div style="background: white; margin: 0in;">
<span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">Mientras pensaba en la logística de todo esto, recibí un correo electrónico de mi amigo, </span><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;"><a href="https://twitter.com/peiyun_shen" target="_blank"><span lang="ES-MX">Peiyun (Sherry) Shen</span></a></span><span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">. Ella contactó en nombre de un "Grupo chino de intercambio de conocimientos de Tableau" dirigido por </span><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;"><a href="https://twitter.com/George_XiuChu" target="_blank"><span lang="ES-MX">Chu Xiu</span></a></span><span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">. El grupo de 19 voluntarios está trabajando muy duro para construir una comunidad Tableau más fuerte en China y uno de sus enfoques ha sido traducir blogs populares en inglés al chino. Ellos ofrecieron gentilmente traducir algunos de nuestros blogs. Como esto era exactamente lo que esperaba / planeaba hacer, acordamos con entusiasmo. El grupo ya ha traducido <a href="https://www.jianshu.com/nb/45434181" target="_blank">28 de nuestros blogs</a> y planea continuar con más traducciones en el futuro. ¡Estoy muy agradecido con este maravilloso equipo de voluntarios que están trabajando tan duro para ayudar a ampliar la comunidad de Tableau en China!<o:p></o:p></span></div>
<div style="background: white; margin: 0in;">
<br /></div>
<div style="background: white; margin: 0in;">
<span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">Con el grupo de intercambio de conocimientos dirigido a los chinos, seguí pensando en español. Decidí comenzar a experimentar con servicios de traducción basados en tecnología, como los que ofrecen AWS y Google. Como prueba, traduje un blog particularmente técnico al español y portugués y le pedí a </span><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;"><a href="https://twitter.com/rosariogaunag" target="_blank"><span lang="ES-MX">Rosario Gauna</span></a></span><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;"> <span lang="ES-MX">y </span></span><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;"><a href="https://twitter.com/tableauing" target="_blank"><span lang="ES-MX">Rodrigo Calloni</span></a></span><span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;"> que los revisaran. Si bien las traducciones eran imperfectas, ambos acordaron que eran legibles y comprensibles.<o:p></o:p></span></div>
<div style="background: white; margin: 0in;">
<br /></div>
<div style="background: white; margin: 0in;">
<span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">Por lo tanto, hemos decidido llevar este experimento un paso más allá. Hemos creado una versión en español de nuestro blog, </span><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;"><a href="http://www.flerlagetwinsespanol.com/" target="_blank"><span lang="ES-MX">www.flerlagetwinsespanol.com</span></a></span><span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;"> y hemos publicado un blog, </span><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;"><a href="https://www.flerlagetwinsespanol.com/2018/06/pivote.html" target="_blank"><span lang="ES-MX">3 Formas de Pivotar Datos para Tableau</span></a></span><span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">, traducido mediante Google Translate. El blog usa fuentes de datos en español y todas las capturas de pantalla de Tableau Desktop / Prep también usan versiones en español. Admito que no tengo idea de lo buena que es la traducción y estoy seguro de que he cometido algunos errores en el camino, pero he decidido probar esto y ver cómo funciona.<o:p></o:p></span></div>
<div style="background: white; margin: 0in;">
<br /></div>
<div style="background: white; margin: 0in;">
<span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">Tenga en cuenta que, actualmente, esto es solo un experimento. Si la traducción es terrible, valió la pena intentarlo; nos detendremos aquí y volveremos a la mesa de dibujo. Pero, si la comunidad Tableau de habla hispana entiende que la traducción es comprensible, planearemos agregar más blogs con el tiempo. Es mucho trabajo, por lo que no traduciremos todos nuestros blogs, pero trataremos de traducir algunos de nuestros más populares. Entonces, si eres hispanohablante, no dudes en leer el blog y decirnos qué piensas. Y, por supuesto, agradecemos sus comentarios y comentarios, ya que sin duda ayudarán a que este proyecto sea más viable.<o:p></o:p></span></div>
<div style="background: white; margin: 0in;">
<br /></div>
<div style="background: white; margin: 0in;">
<span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">¡Gracias por leer!<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<span lang="ES-MX" style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">…………………<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<b><span style="border: 1pt none; color: #404040; font-family: "palatino linotype" , serif; font-size: 26pt; padding: 0in;">An Experiment with Spanish<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="border: 1pt none; font-family: "palatino linotype" , serif; font-size: 14pt; padding: 0in;">I love the Tableau Community so much. Through this community, I’ve enhanced my Tableau skills, I’ve grown my professional network, and found a lot of lifetime friends. Because of my own experience with the community, I’ve always wanted to help broaden and diversify it. One thing, in particularly, I’ve wanted is to find a way to increase the community’s </span><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">geographic diversity, as I feel there are great opportunities to help people “see and understand data” all over the world.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">As the co-owner of a popular Tableau blog, it occurred to me that one way to do this would be to provide our blogs in different languages. I’ve found that most Tableau blogs tend to be written in English and I think there is an opportunity to provide blogs in other languages. While there are 379 million native English speakers in the world and millions more who speak English as a second language, there are still many people who speak and read little to no English at all. There are 1.3 billion native speakers of Chinese (917 million speak Mandarin) and 460 million native Spanish speakers (<a href="https://www.babbel.com/en/magazine/the-10-most-spoken-languages-in-the-world" target="_blank">The 10 Most Spoken Languages In The World</a>). I’ve long admired <a href="https://twitter.com/rosariogaunag" target="_blank">Rosario Gauna</a> and the fact that she maintains a bi-lingual blog, writing in both Spanish and English. So, what if I could find a way to do something similar and translate our blogs into Chinese and/or Spanish in order to help Tableau users in these communities?<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">Unfortunately, this has some pretty significant challenges. First and foremost, I don’t speak any other languages. I live in a part of the United States where I can drive hundreds (or even thousands) of miles in any direction and only encounter English speakers (with a few exceptions, such as Quebec) and my two years of high school Spanish, unfortunately, didn’t really take hold. That leaves us with finding a service for translation, but these tend to cost money and we don’t really have the budget for that. Our blog is something we do for free. Kevin and I make no money on it—we don’t even host advertisements. So, paying for a service isn’t really a viable option. Another problem is that much of our content is highly technical and Tableau-specific in nature. So, even if we were able to find a person or service that was affordable, that person would still need some knowledge of Tableau.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">As I was thinking through the logistics of all this, I received an email from my friend, <a href="https://twitter.com/peiyun_shen" target="_blank">Peiyun (Sherry) Shen</a>. She reached out on behalf of a “Chinese Tableau Knowledge Sharing Group” led by <a href="https://twitter.com/George_XiuChu" target="_blank">Chu Xiu</a>. The group of 19 volunteers is working very hard to build a stronger Tableau community in China and one of their approaches has been to translate popular English blogs into Chinese. They graciously offered to translate some of our blogs. As this was exactly what I was hoping/planning to do, we enthusiastically agreed. The group has already translated <a href="https://www.jianshu.com/nb/45434181" target="_blank">28 of our blogs</a> and are planning to continue with more translations in the future. I’m so thankful to this wonderful team of volunteers who are working so hard to help broaden the Tableau community in China!<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">With Chinese being addressed by the knowledge sharing group, I continued to think about Spanish. I decided to start experimenting with technology-based translation services, such as those offered by AWS and Google. As a test, I translated one particularly technical blog into Spanish and Portuguese and asked <a href="https://twitter.com/rosariogaunag" target="_blank">Rosario Gauna</a> and <a href="https://twitter.com/tableauing" target="_blank">Rodrigo Calloni</a> to review them. While the translations were imperfect, both agreed that they were readable and understandable.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">Thus, we’ve decided to take this experiment one step further. We’ve created a Spanish-language version of our blog, <a href="http://www.flerlagetwinsespanol.com/" target="_blank">www.flerlagetwinsespanol.com</a> and have posted one blog, <a href="https://www.flerlagetwinsespanol.com/2018/06/pivote.html" target="_blank">3 Formas de Pivotar Datos para Tableau</a>, translated using Google Translate. The blog uses data sources in Spanish and all Tableau Desktop/Prep screenshots use Spanish versions as well. I’ll admit that I have no idea how good the translation is and I’m sure that I’ve made some mistakes along the way, but I’ve decided to give this a try and see how it works.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">Keep in mind that, currently, this is just an experiment. If the translation is terrible, then it was worth a shot; we’ll stop here and go back to the drawing board. But, if the translation proves to be understandable by the Spanish-speaking Tableau community, then we’ll plan to add more blogs over time. It’s a lot of work, so we won’t be translating <i>all</i> of our blogs, but we will try to translate some of our more popular ones. So, if you’re Spanish-speaker, then please feel free to give the blog a read and let us know what you think. And, of course, we welcome your feedback and comments as they will certainly help to make this project more viable.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;">Thanks for reading!<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<i><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 14pt;"><a href="https://www.freepik.com/vectors/people" target="_blank">Header image created by Freepik</a><o:p></o:p></span></i></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="border: 1pt none; color: #404040; font-family: "palatino linotype" , serif; font-size: 14pt; padding: 0in;">Ken Flerlage, XXXXXX X, XXXXX</span><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-top: 0in; vertical-align: baseline;">
<a href="https://twitter.com/flerlagekr" target="_blank"><span style="border: 1pt none; color: #ff3c36; font-family: "palatino linotype" , serif; font-size: 14pt; padding: 0in;">Twitter</span></a><span style="border: 1pt none; color: #404040; font-family: "palatino linotype" , serif; font-size: 14pt; padding: 0in;"> | </span><a href="https://www.linkedin.com/in/kennethflerlage/" target="_blank"><span style="border: 1pt none; color: #ff3c36; font-family: "palatino linotype" , serif; font-size: 14pt; padding: 0in;">LinkedIn</span></a><span style="border: 1pt none; color: #404040; font-family: "palatino linotype" , serif; font-size: 14pt; padding: 0in;"> | </span><a href="https://github.com/flerlagekr" target="_blank"><span style="border: 1pt none; color: #ff3c36; font-family: "palatino linotype" , serif; font-size: 14pt; padding: 0in;">GitHub</span></a><span style="border: 1pt none; color: #404040; font-family: "palatino linotype" , serif; font-size: 14pt; padding: 0in;"> | </span><span style="border: 1pt none; color: #ff3c36; font-family: "palatino linotype" , serif; font-size: 14pt; padding: 0in;"><a href="https://public.tableau.com/profile/ken.flerlage#!/" target="_blank">Tableau Public</a></span><span style="color: #222222; font-family: "palatino linotype" , serif; font-size: 12pt;"><o:p></o:p></span><br />
<br /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQcSxqLdx269-MlykKk-ySLrIQ_PY5dlENkv29pLBszIG7d8Cwy1l7sogTsvPzd1CEaui6ZycNsuuJZaOQPj1KOYfdwZhUKWtGWUDDLkjDqY_TPuCzNp72Al2yFp5G99MGLsxjdDoovbUB/s1600/logo_4.png" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="386" data-original-width="916" height="82" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQcSxqLdx269-MlykKk-ySLrIQ_PY5dlENkv29pLBszIG7d8Cwy1l7sogTsvPzd1CEaui6ZycNsuuJZaOQPj1KOYfdwZhUKWtGWUDDLkjDqY_TPuCzNp72Al2yFp5G99MGLsxjdDoovbUB/s200/logo_4.png" width="200" /></a><br />
<br />Ken Flerlagehttp://www.blogger.com/profile/03698843288892226027noreply@blogger.com0tag:blogger.com,1999:blog-8557728283287085050.post-55486511692556200132018-06-03T10:07:00.000-04:002020-08-02T12:08:00.280-04:003 Formas de Pivotar Datos para Tableau<div class="separator" style="clear: both; text-align: center;">
<img border="0" data-original-height="862" data-original-width="1600" height="344" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS5-3yJT_OHAxNCPKj6i1HZ1K9q7OatFR6qrcMUfv9RbChm0vSW3N-IILiTHlrH_ZA88pTZjhOPDR9-2IDnE08LPMGkL9Y4w6fXZncA8vURSwl1Xvh_czTmHKz23_FMIByLyNXQDLOtRku/s640/Heading2.png" width="640" /></div>
<br />
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">En el curso de mi trabajo con Tableau, me di cuenta de
cuánto le gusta a la plataforma que los datos estén bien organizados en
filas. Por ejemplo, supongamos que tiene algunos datos de la encuesta que contienen
una sola fila para cada respuesta, luego respuestas numéricas del 1 al 5 para 5
preguntas. Por lo general, los resultados de la encuesta enumerarán cada
una de esas respuestas en columnas separadas, como esta:</span></div>
<a name='more'></a><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span><br />
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" data-original-height="202" data-original-width="866" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQzERkvQifX7YEA_PI1S26V6vt0Vu_9zoYu0V9r0Q00uXalv1uR-fghiwb8qsG7w8uFWJoHzq5VKIS9aa5LAnohu62DPz7eRmDTsP5NoM7C6VENqfoHOdXzvLOPaLCSayN5wGJVmz-I4L6/s1600/1+Unpivoted+Example.PNG" /></div>
<div align="center" style="background: white; margin: 0in; mso-add-space: auto; text-align: center;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Pero, datos como este a menudo pueden ser muy
difíciles de visualizar en Tableau. Sería mucho mejor si sus datos fueran
"pivotados" para verse así:</span><span lang="ES-MX" style="color: black; font-family: "palatino linotype" , serif; font-size: 14.0pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" data-original-height="521" data-original-width="552" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYtqAB0mHASg9mH6at3EpEeO3zcZW52dTAx_fs71vQnXmKYszWIBS5B1WLdQP0LJ7DKk9SIgRg9neEtXBcdKlXoM6Yqslfo8ZwK5C-qtGGCu-XH82AXDoH9k3WgoMuJLZdar5pE5sIe1F4/s1600/2+Pivoted+Example.PNG" /></div>
<div align="center" style="background: white; margin: 0in; mso-add-space: auto; text-align: center;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Esto le dará una medida única, que puede hacer que sus
datos sean mucho más fáciles de trabajar en Tableau. Puede reorganizar
manualmente estos datos si lo desea, pero eso es mucho trabajo. La buena
noticia es que hay varias formas en que puede pivotar sus datos automáticamente
para prepararse para la visualización en Tableau. Este blog compartirá 3
de esos métodos contigo.</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<b><span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 20.0pt;">Pivotando con Tableau</span></b><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: palatino linotype, serif; font-size: 18.6667px;">El método más simple es pivotar datos directamente en Tableau. Si trae sus datos no divididos a Tableau, puede seleccionar las columnas que desea pivotar, en nuestro caso, las cinco preguntas, luego haga clic con el botón derecho y seleccione "Pivotar" como se muestra a continuación. Luego puede cambiar el nombre de los campos dinámicos y los valores que desee.</span><br />
<span lang="ES-MX" style="color: #404040; font-family: palatino linotype, serif; font-size: 18.6667px;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" data-original-height="793" data-original-width="1094" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0dv5rGtsrtS_rreyql74KOAsiz7V-zPLBbBjDWdgA-ijSuzldDT26PMBa1Tnz1ldSpWWgau-lRAdK_eElvev3wy7JBymMFr2ysHsrA-ihGrQJe8yPC1uUF2RYDXZ9wkhtYgOQQf37cl70/s1600/3+Pivot+in+Tableau.gif" /></div>
<div style="background: white; margin: 0in; text-align: center;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Bastante genial, ¿eh? Es decir, hasta que intente
hacer esto con una fuente de datos que no sea Excel, Google Sheets o
texto. Desafortunadamente, Tableau no le permite cambiar las conexiones a
bases de datos "reales" como SQL Server y Oracle, por lo que no tiene
suerte ... ¿o no?</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<b><span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 20.0pt;">Pivotar con Tableau Prep</span></b><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Hace un par de años, Tableau lanzó un nuevo
producto de software llamado </span><span style="color: black; mso-color-alt: windowtext;"><a href="https://translate.google.com/translate?hl=en&prev=_t&sl=auto&tl=es&u=https://www.tableau.com/products/prep" target="_blank"><span lang="ES-MX" style="color: #ff3c36; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Tableau Prep</span></a></span><span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">. El software está diseñado
para permitirle “preparar” rápida y fácilmente sus datos antes de visualizarlos
en Tableau. Si bien ya puede hacer parte de este trabajo de preparación de
datos en Tableau Desktop: unir tablas, pivotar columnas en filas, agrupar texto
similar, etc. de los pasos para que puedan ejecutarse fácilmente nuevamente en
el futuro, ahorrándole el tiempo de preparar sus datos manualmente. </span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Tableau Prep tiene una función de pivote incorporada
que le permite pivotar rápida y fácilmente sus datos desde cualquier fuente de
datos compatible con Tableau Prep, incluidos SQL Server, Oracle y muchas otras
plataformas de bases de datos.<o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Para pivotar nuestros datos en Tableau Prep, primero
debemos conectarnos a nuestros datos de origen. Luego agregamos un paso de
tabla dinámica. A continuación, arrastramos sobre los campos que deseamos
pivotar. Y, como paso final, podemos cambiar el nombre de los campos dinámicos.
La animación a continuación muestra los pasos.<o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" data-original-height="766" data-original-width="1234" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD2o_l3KYHMV4gEiFHGpIjg9lttcJVj_mfJV22nhmxJ4s7dEnZl1FWO0RZPDPNTIMJzb93cUeM6KwtqG3GWD2h7VU-pzjqS0lG0glix2rUwvmbGsvf62ndaD80hWif4jLpJV8m3qlspgbl/s1600/7+Pivot+in+Prep.gif" /></div>
<div align="center" style="background: white; margin: 0in; mso-add-space: auto; text-align: center;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<b><span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 20.0pt;">Pivotar con SQL personalizado</span></b><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Si, por alguna razón, Tableau Prep no está disponible
para usted o simplemente no desea introducir otra herramienta en su proceso,
hay una solución final que funcionará con muchas plataformas de bases de datos
importantes, incluidos SQL Server y Oracle.</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Supongamos que tiene una tabla llamada <b>Respuestas </b>en
su base de datos SQL u Oracle que se parece a la muestra de la encuesta
mostrada anteriormente. Aquí está la declaración de creación en
SQL: </span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">CREATE</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">TABLE</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> dbo.</span><span lang="ES-MX" style="color: black; mso-color-alt: windowtext;">
</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">Respuestas</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">(</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> [Encuestado]
[nvarchar](50),</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> [Pregunta1]
[int],</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> [Pregunta2]
[int],</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> [Pregunta3]
[int],</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> [Pregunta4]
[int],</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> [Pregunta5]
[int],</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">)</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Tanto SQL como Oracle tienen funciones para hacer
esto. La función PIVOT de SQL / Oracle en realidad hace exactamente lo
contrario de lo que queremos: cambia las filas en columnas. Entonces, lo
que queremos es UNPIVOT. UNPIVOT hace casi exactamente lo mismo que la
función pivote de Tableau.</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Comencemos mirando una simple declaración
SELECT. Para extraer los datos de la tabla <b>Respuestas</b>,
escribiríamos algo como esto. <i>Nota: Estoy usando SQL Server, pero casi
todo esto se traduce en Oracle. Cuando haya diferencias, las señalaré.</i> <b> </b> </span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">SELECT</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> Encuestado, Pregunta1, Pregunta2, Pregunta3, Pregunta4, Pregunta5 </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">FROM </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">dbo.Respuestas</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Esto devolverá los siguientes datos, que se parecen
bastante a nuestra hoja de cálculo original.</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" data-original-height="172" data-original-width="841" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiVezsGjyqoBXviUvFKU3kEbnvnGEiNLo3SSs2wbDCDQrvmGVAeA5Li9izsOnpLuSPbPRzvUqYSzhpZcsngrJjtXVtOBycc467dAPTCVxnJNMp5_2pq6QM3bRNc_H-s-cZs4z-rl4L8blx/s1600/5+SQL+Select+Output.png" /></div>
<div align="center" style="background: white; margin: 0in; mso-add-space: auto; text-align: center;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Sin embargo, desvincular los datos es un poco más
complejo. Aquí está el SQL</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">SELECT</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> Encuestado, Pregunta, Responder</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">FROM</span><span style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">(</span><span style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">SELECT</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> Encuestado, Pregunta1, Pregunta2, Pregunta3, Pregunta4, Pregunta5 </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">FROM</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> dbo.Respuestas</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">) </span><span style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">AS</span><span style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> source_query</span><span style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">UNPIVOT</span><span style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">(</span><span style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">Responder </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">FOR</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> Pregunta
IN</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">(Pregunta1, Pregunta2, Pregunta3, Pregunta4, Pregunta5)</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">) </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">AS</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> pivot_result</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Analicemos esto con un poco más de detalle. En
primer lugar, vemos nuestra declaración de selección original cerca de la parte
superior, comenzando en la cuarta línea:</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">SELECT</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> Encuestado, Pregunta1, Pregunta2, Pregunta3, Pregunta4, Pregunta5 </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">FROM</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> dbo.Respuestas</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Esto extraerá nuestro conjunto de datos inicial
directamente de la tabla. Observe que esta subconsulta se alias
como "source_query". Puede alias la subconsulta con el nombre
que elija, pero debe estar allí.</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">A continuación vemos lo siguiente:</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">UNPIVOT</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">(</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">Responder </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">FOR</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> Pregunta
<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">IN</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">(Pregunta1,
Pregunta2, Pregunta3, Pregunta4, Pregunta5)<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">) </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">AS</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> pivot_result</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Esto iniciará las instrucciones para desconectar la
selección anterior. Tomará el valor en cada uno de los cinco campos de
preguntas y los colocará en una sola columna llamada <b>Respuesta </b>. El <i>nombre </i>de
cada pregunta (Pregunta1, Pregunta2, etc.) se colocará en una columna
llamada <b>Pregunta </b>. Nuevamente, al igual que la selección
original, debemos darle un alias a esta subconsulta; en este caso, he
usado "pivot_result". <o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Finalmente, tenemos la primera parte de la consulta,
"</span><span lang="ES-MX" style="border: none 1.0pt; color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt; padding: 0in;">SELECT
Encuestado, Pregunta, Responder FROM</span><span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">". Esto define qué campos se devuelven de la combinación de
las dos primeras subconsultas.</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Cuando lo ejecutamos, obtenemos el siguiente
resultado, que es exactamente lo que necesitamos:</span><span lang="ES-MX" style="color: black; font-family: "palatino linotype" , serif; font-size: 14.0pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" data-original-height="587" data-original-width="520" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpUeWQm9Zr8zD9Cpz1tgpdu3DdrdgRozWXLnfYfJpuTqVTWgfLzpWsdLxbcqRA6Wper3vljeI6-gdOEfInSJi1EJoP66FMCMDa4MK1CbdTAVV65Udw52EwFtf-DxyK2ihmCmfcX0F8s9Ux/s1600/6+SQL+Pivot+Output.png" /></div>
<div align="center" style="background: white; margin: 0in; mso-add-space: auto; text-align: center;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">La sintaxis para Oracle es casi exactamente la misma
con una diferencia clave. En Oracle, los alias de subconsulta no son
necesarios. Entonces su declaración se vería así:</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">SELECT</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> Encuestado, Pregunta, Responder</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">FROM</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">(</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">SELECT</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> Encuestado, Pregunta1, Pregunta2, Pregunta3, Pregunta4, Pregunta5 </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">FROM</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> dbo.Respuestas</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">)</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">UNPIVOT</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">(</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">Responder </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">FOR</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> Pregunta
IN</span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: blue; font-family: "courier new"; font-size: 14.0pt; padding: 0in;"> </span><span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">(Pregunta1, Pregunta2, Pregunta3, Pregunta4, Pregunta5)</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; vertical-align: baseline;">
<span lang="ES-MX" style="background: white; border: none 1.0pt; color: #222222; font-family: "courier new"; font-size: 14.0pt; padding: 0in;">)</span><span lang="ES-MX" style="color: #222222; font-family: "courier new"; font-size: 12.0pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Ahora que hemos escrito nuestro SQL, podemos
aprovecharlo en Tableau mediante los siguientes pasos:</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">1) Conéctese a su base de datos en Tableau. </span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">2) Crear una "Nueva personalización de SQL" </span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">3) Copie y pegue el SQL documentado
anteriormente. </span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Con Tableau Prep, el SQL personalizado para datos
dinámicos es probablemente una solución muy específica, pero podría ser útil en
algunos casos de uso, por lo que si lo necesita, ya sabe cómo hacerlo.</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">¡¡Gracias por leer!!</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<br /></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span lang="ES-MX" style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Ken Flerlage, 3 de junio de 2018</span><span lang="ES-MX" style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="background: white; margin: 0in; mso-add-space: auto;">
<span style="color: black; mso-color-alt: windowtext;"><a href="https://translate.google.com/translate?hl=en&prev=_t&sl=auto&tl=es&u=https://twitter.com/flerlagekr" target="_blank"><span style="color: #ff3c36; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Twitter</span></a></span><span style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;"> | </span><span style="color: black; mso-color-alt: windowtext;"><a href="https://translate.google.com/translate?hl=en&prev=_t&sl=auto&tl=es&u=https://www.linkedin.com/in/kennethflerlage/" target="_blank"><span style="color: #ff3c36; font-family: "palatino linotype" , serif; font-size: 14.0pt;">LinkedIn</span></a></span><span style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;"> | </span><span style="color: black; mso-color-alt: windowtext;"><a href="https://translate.google.com/translate?hl=en&prev=_t&sl=auto&tl=es&u=https://github.com/flerlagekr" target="_blank"><span style="color: #ff3c36; font-family: "palatino linotype" , serif; font-size: 14.0pt;">GitHub</span></a></span><span style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;"> | </span><span style="color: black; mso-color-alt: windowtext;"><a href="https://translate.google.com/translate?hl=en&prev=_t&sl=auto&tl=es&u=https://public.tableau.com/profile/ken.flerlage%23!/#!/" target="_blank"><span style="color: #ff3c36; font-family: "palatino linotype" , serif; font-size: 14.0pt;">Tableau Public</span></a></span><span style="color: #404040; font-family: "palatino linotype" , serif; font-size: 14.0pt;"> </span><span style="color: black; font-size: 13.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0in; margin-top: 0in; mso-add-space: auto; mso-margin-bottom-alt: 8.0pt; mso-margin-top-alt: 0in;">
<br /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCbe2Rp7wO4SKXR_4JLUq-pENZfgc2oY6ZLunUEhrQcNr_qfmWN24mylw_O9o1Yo9nA33aALtTa66sWErieRvXhU0KVYKZeYJgc87020J1vhZ_pBwy0HwkAAChwvyhAAaSAOt9foSA2gzW/s1600/logo_4+Medium.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="270" data-original-width="641" height="83" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCbe2Rp7wO4SKXR_4JLUq-pENZfgc2oY6ZLunUEhrQcNr_qfmWN24mylw_O9o1Yo9nA33aALtTa66sWErieRvXhU0KVYKZeYJgc87020J1vhZ_pBwy0HwkAAChwvyhAAaSAOt9foSA2gzW/s200/logo_4+Medium.png" width="200" /></a>Ken Flerlagehttp://www.blogger.com/profile/03698843288892226027noreply@blogger.com3