Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hola Comunidad
Tengo la siguiente tabla donde quisiera contruir un estado que muestre los cambios que se presentan en el Stage_consolidado
ID_Operacion |Stage_consolidado |Fecha_corte |PE_STAGE
111001058379 |STG 2 |30/09/2021 |$8.199.152
111001058379 |STG 2 |31/12/2021 |$8.199.152
111001058379 |STG 1 |31/03/2022 |$3.249.157
111001058379 |STG 1 |30/06/2022 |$3.249.157
111001013747 |STG 1 |30/09/2021 |$2.147.389.688
111001013747 |STG 2 |31/12/2021 |$447.389.688
Quiero ver la matriz donde se vean los cambios de estado de la siguiente manera
Estado |30/09/2021 |31/12/2021 |31/03/2022 |30/06/2022
de STG 2 a STG 1 | | | 1 |
de STG 1 a STG 2 | | 1 | |
Solved! Go to Solution.
Please try > measure
de STG 2 a STG 1 =
VAR CurrentStage =
SELECTEDVALUE ( 'Table'[Fecha_corte] )
VAR CurrentDate =
SELECTEDVALUE ( 'Table'[Stage_consolidado] )
VAR CurrentIDTable =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[ID_Operacion] ) )
VAR TableBefore =
FILTER ( 'Table', 'Table'[Fecha_corte] < CurrentDate )
VAR PreviousRecord =
TOPN ( 1, TableBefore, 'Table'[Fecha_corte] )
VAR PreviousStage =
MAXX ( PreviousRecord, 'Table'[Stage_consolidado] )
RETURN
IF ( PreviousStage = CurrentStage && CurrentStage = "STG 1", 1 )
de STG 1 a STG 2 =
VAR CurrentStage =
SELECTEDVALUE ( 'Table'[Fecha_corte] )
VAR CurrentDate =
SELECTEDVALUE ( 'Table'[Stage_consolidado] )
VAR CurrentIDTable =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[ID_Operacion] ) )
VAR TableBefore =
FILTER ( 'Table', 'Table'[Fecha_corte] < CurrentDate )
VAR PreviousRecord =
TOPN ( 1, TableBefore, 'Table'[Fecha_corte] )
VAR PreviousStage =
MAXX ( PreviousRecord, 'Table'[Stage_consolidado] )
RETURN
IF ( PreviousStage = CurrentStage && CurrentStage = "STG 2", 1 )
Corrected formula
de STG 2 a STG 1 =
VAR CurrentStage =
SELECTEDVALUE ( 'Table'[Stage_consolidado] )
VAR CurrentDate =
SELECTEDVALUE ( 'Table'[Fecha_corte] )
VAR CurrentIDTable =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[ID_Operacion] ) )
VAR TableBefore =
FILTER ( 'Table', 'Table'[Fecha_corte] < CurrentDate )
VAR PreviousRecord =
TOPN ( 1, TableBefore, 'Table'[Fecha_corte] )
VAR PreviousStage =
MAXX ( PreviousRecord, 'Table'[Stage_consolidado] )
RETURN
IF ( PreviousStage = CurrentStage && CurrentStage = "STG 1", 1 )
Please try > measure
de STG 2 a STG 1 =
VAR CurrentStage =
SELECTEDVALUE ( 'Table'[Fecha_corte] )
VAR CurrentDate =
SELECTEDVALUE ( 'Table'[Stage_consolidado] )
VAR CurrentIDTable =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[ID_Operacion] ) )
VAR TableBefore =
FILTER ( 'Table', 'Table'[Fecha_corte] < CurrentDate )
VAR PreviousRecord =
TOPN ( 1, TableBefore, 'Table'[Fecha_corte] )
VAR PreviousStage =
MAXX ( PreviousRecord, 'Table'[Stage_consolidado] )
RETURN
IF ( PreviousStage = CurrentStage && CurrentStage = "STG 1", 1 )
de STG 1 a STG 2 =
VAR CurrentStage =
SELECTEDVALUE ( 'Table'[Fecha_corte] )
VAR CurrentDate =
SELECTEDVALUE ( 'Table'[Stage_consolidado] )
VAR CurrentIDTable =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[ID_Operacion] ) )
VAR TableBefore =
FILTER ( 'Table', 'Table'[Fecha_corte] < CurrentDate )
VAR PreviousRecord =
TOPN ( 1, TableBefore, 'Table'[Fecha_corte] )
VAR PreviousStage =
MAXX ( PreviousRecord, 'Table'[Stage_consolidado] )
RETURN
IF ( PreviousStage = CurrentStage && CurrentStage = "STG 2", 1 )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
14 | |
11 | |
7 |
User | Count |
---|---|
26 | |
24 | |
12 | |
11 | |
10 |