Hi
I need create measure with range 2 to compare targeting selection or some other solution that allows me to compare the current evaluation with the previous one, given a previous segment of year.
Tables
TB_EVALUATION_HISTORY | ||||||
ID_checkGroup | ID_pHistory | ID_parent | ID_current_Assessment | Period | RANK | EVALUATIONS |
check_1 | 1 | 1 | 70 | 2022 | 1 | 3_LOW |
check_3 | 2 | 1 | 35 | 2019 | 2 | 2_MEDIUM |
check_1 | 3 | 2 | 63 | 2022 | 1 | 1_HIGH |
check_2 | 4 | 2 | 37 | 2021 | 2 | 3_LOW |
check_1.9 | 5 | 2 | 20 | 2020 | 3 | 2_MEDIUM |
check_1.9 | 6 | 3 | 40 | 2020 | 3 | 2_MEDIUM |
check_1.9 | 7 | 5 | 43 | 2020 | 1 | 1_HIGH |
check_2 | 8 | 3 | 45 | 2021 | 2 | 1_HIGH |
check_3 | 9 | 3 | 41 | 2019 | 3 | 3_LOW |
check_1 | 10 | 3 | 49 | 2022 | 1 | 1_HIGH |
Column detail | |
ID_checkGroup | planification identification |
ID_pHistory | secuencial |
ID_parent | id to review context |
ID_current_Assessment | EValuation |
Period | Plan period |
RANK | column calculation to identify sequencial evaluation, considering all records |
TB_EVALUATIONS | |
ID_current_Assessment | EVALUATIONS |
70 | 3_LOW |
35 | 2_MEDIUM |
63 | 1_HIGH |
37 | 3_LOW |
20 | 2_MEDIUM |
40 | 2_MEDIUM |
43 | 1_HIGH |
45 | 2_MEDIUM |
41 | 3_LOW |
49 | 1_HIGH |
when i click on the period (2022).
The graph shows me all the records that were evaluated in 2022. But I can't show the previous evaluation done on the same record.
Expected graph, click on 2022
Expected graph, when i click on the period (2021).
THANKS!!
Solved! Go to Solution.
Dado que las dos publicaciones son el mismo problema, te ayudé a fusionar en una sola publicación.
Espero que no te importe.
Aquí está el alma para devolver la evaluación anterior (rango + 1).
Puede crear la siguiente medida. Aún así, colóquelo en el filtro de nivel visual y configure mostrar elementos cuando el valor sea 1.
Measure =
VAR _rank =
CALCULATE (
SUM ( 'TB_EVALUATION_HISTORY'[Rank] ),
FILTER (
ALLSELECTED ( 'TB_EVALUATION_HISTORY' ),
[ID_parent] = MAX ( 'TB_EVALUATION_HISTORY'[ID_parent] )
&& [Period] = SELECTEDVALUE ( 'TBPeriod'[Period] )
)
)
RETURN
IF (
IF ( ISBLANK ( _rank ), BLANK (), _rank + 1 )
= MAX ( 'TB_EVALUATION_HISTORY'[Rank] ),
1
)
v
Saludos
Esteban Tao
Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
hi tao!!
Sorry for the response time.
In general terms I need to always get the lowest rank and the next one. Always starting from the selected year and in case of not being selected any year obtain all the ranks 1 and 2 of the table.
It's not really the year+1. It is the previous evaluation, that is rank+1.
The next record was misentered. I was with Tank 3, but it's rank 4. The rank is the column that classifies the sequence of evaluations 🙂 I've changed it
Desea filtrar un año en función de la segmentación de datos y, a continuación, devolver los valores del año filtrado y el año anterior del año filtrado, ¿verdad?
Es posible que necesite una segmentación de datos de año por separado. Puede crear una tabla de años con DAX.
Table = DISTINCT('TB_EVALUATION_HISTORY'[Period])
A continuación, cree una medida como filtro de nivel visual.
Measure =
VAR _year =
MAX ( 'TB_EVALUATION_HISTORY'[Period] )
VAR _select =
CALCULATE (
MAX ( 'TB_EVALUATION_HISTORY'[Period] ),
FILTER (
ALLSELECTED ( TB_EVALUATION_HISTORY ),
[ID_parent] = MAX ( 'TB_EVALUATION_HISTORY'[ID_parent] )
&& [Period] = SELECTEDVALUE ( 'Table'[Period] )
)
)
RETURN
IF ( _select = _year || _select - 1 = _year, 1 )
Coloque la medida en el filtro de nivel visual del objeto visual de la tabla. Configure mostrar elementos cuando el valor sea 1.
Saludos
Esteban Tao
Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Lo siento por el tiempo de respuesta.
No es realmente el año + 1. Es la evaluación previa, es decir, rango+1..
Dado que las dos publicaciones son el mismo problema, te ayudé a fusionar en una sola publicación.
Espero que no te importe.
Aquí está el alma para devolver la evaluación anterior (rango + 1).
Puede crear la siguiente medida. Aún así, colóquelo en el filtro de nivel visual y configure mostrar elementos cuando el valor sea 1.
Measure =
VAR _rank =
CALCULATE (
SUM ( 'TB_EVALUATION_HISTORY'[Rank] ),
FILTER (
ALLSELECTED ( 'TB_EVALUATION_HISTORY' ),
[ID_parent] = MAX ( 'TB_EVALUATION_HISTORY'[ID_parent] )
&& [Period] = SELECTEDVALUE ( 'TBPeriod'[Period] )
)
)
RETURN
IF (
IF ( ISBLANK ( _rank ), BLANK (), _rank + 1 )
= MAX ( 'TB_EVALUATION_HISTORY'[Rank] ),
1
)
v
Saludos
Esteban Tao
Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
@v-stephen-msft
Esto efectivamente resuelve el boleto, gracias!!
si es posible, necesito contar registro con condición
Este es un requisito completamente nuevo, para esto, se recomienda que vuelva a abrir una nueva publicación, gracias. 😁
Me alegra saber que mi solución funciona.
Saludos
Esteban Tao
Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
Join the biggest FREE Business Applications Event in LATAM this February.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 |