Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hola, chicos
¿Puede por favor ayudarme cómo puedo obtener Trimestre Fiscal sobre Trimestre cambio %. Tengo datos como abajo
2016-Q1 --> 100
2016-Q2 --> 200
2016-Q3 --> 300
2016-Q4--> 400
2017-Q1 --> 150
2017-Q2 --> 250
2017-Q3 --> 350
2017-Q4--> 450
Necesito calcular 2016Q1 con 2017-Q1 y así sucesivamente..
También como mencioné esto son qtr fiscal por lo que la fecha de inicio y la fecha de finalización no será el mismo Q1 comenzar a partir de abril y Q4 qtr termina en mar.
Avísame cómo lograrlo.
Gracias de antemano.
@GJain No está muy claro si tienes fechas reales o sólo esas cosas del cuarto de año. Si sólo el año-trimestre cosas, usted podría hacer:
Measure =
VAR __Value = MAX('Table'[Value])
VAR __Current = MAX('Table'[YearQuarter])
VAR __CurrentYear = LEFT(__Current,4) * 1.
VAR __CurrentQuarter = RIGHT(__Current,2)
VAR __PreviousYear = IF(__CurrentQuarter="Q1",__CurrentYear - 1,__CurrentYear)
VAR __PreviousQuarter =
SWITCH(__CurrentQuarter,
"Q1","Q4",
"Q2","Q1",
"Q3","Q2",
"Q3"
)
VAR __PreviousYearQuarter = __PreviousYear & "-" & __PreviousQuarter
VAR __PreviousValue = MAXX(FILTER('Table',[YearQuarter]=__PreviousYearQuarter),[Value])
RETURN
(__CurrentValue - __PreviousValue)/__PreviousValue
@GJain , en caso de que tenga tabla de fechas puede utilizar datesqtd.
De lo contrario, cree una tabla qtr y cree Rank
Qtr Rank á RANKX(all('Date'),'Date'[Qtr],ASC,Dense) // YYYY QQ debería caber aquí, pero tener una tabla separada
Este Qtr - CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]-max('Date'[Qtr Rank])))
Last Qtr á CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]-max('Date'[Qtr Rank])-1))
si tienes fecha entonces
Ventas de QTD: CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))
Last QTD Sales ? CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))
Power BI — QTD
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |