Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Paulyeo11
Impactful Individual
Impactful Individual

¿Cómo importar el calendario maestro a mi archivo PBI de pedido de ventas?

Hola a todos

Tengo a continuación PBI archivo consisit sólo calendario maestro del Sr. Amit trabajando bien :-

https://www.dropbox.com/s/klm9zz8q80xlhps/preWebinarPostCal_PY_DATA%20V004.pbix?dl=0

No puedo hacer uso del archivo PBI del calendario maestro anterior para importar mi archivo de datos sin procesar de pedido de ventas, la fecha no se puede convertir en texto.

Busco aconsejar cómo importar el calendario maestro a mi archivo PBI ?

Espero que alguien pueda compartir conmigo.

Paul Yeo

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Paulyeo11

tal vez usted puede tratar de esto para crear una nueva tabla de calendario. Sin embargo, usted necesita hacer alguna modificación ya que puede ser ahora 100% adecuado para su negocio real.

Dates = 
ADDCOLUMNS (
    CALENDAR (MINX(DATA, DATA[Calendar Date]), EDATE(NOW(), 0)),
	    "DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),
	    "Year", YEAR ( [Date] ),
	    "FinancialYear", IF (MONTH ( [Date]) < 7, YEAR ( [Date]), YEAR ( [Date]) + 1),
	    "FinancialPeriod", IF (MONTH ( [Date]) < 7, MONTH ( [Date]) + 6, MONTH ( [Date]) - 6),
	    "YYYY-MM", FORMAT ( [Date], "YYYY" ) & "-" & FORMAT ( [Date], "MM" ),
	    "Monthnum", MONTH ( [Date]),
	    "Monthnumber", FORMAT ( [Date], "MM" ),
	    "YearMonthnumber", FORMAT ( [Date], "YYYY/MM" ),
	    "YearMonthShort", FORMAT ( [Date], "YYYY/mmm" ),
	    "MonthNameShort", FORMAT ( [Date], "mmm" ),
	    "MonthNameLong", FORMAT ( [Date], "mmmm" ),
	    "DayOfWeekNumber", WEEKDAY ( [Date] ),
	    "DayOfWeek", FORMAT ( [Date], "dddd" ),
	    "DayOfWeekShort", FORMAT ( [Date], "ddd" ),
	    "Quarter", "Q" & FORMAT ( [Date], "Q" ),
	    "YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ),
	"MonthofYear", FORMAT( [Date], "mmmm-yyyy")
	)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
ryan_mayu
Super User
Super User

@Paulyeo11

tal vez usted puede tratar de esto para crear una nueva tabla de calendario. Sin embargo, usted necesita hacer alguna modificación ya que puede ser ahora 100% adecuado para su negocio real.

Dates = 
ADDCOLUMNS (
    CALENDAR (MINX(DATA, DATA[Calendar Date]), EDATE(NOW(), 0)),
	    "DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),
	    "Year", YEAR ( [Date] ),
	    "FinancialYear", IF (MONTH ( [Date]) < 7, YEAR ( [Date]), YEAR ( [Date]) + 1),
	    "FinancialPeriod", IF (MONTH ( [Date]) < 7, MONTH ( [Date]) + 6, MONTH ( [Date]) - 6),
	    "YYYY-MM", FORMAT ( [Date], "YYYY" ) & "-" & FORMAT ( [Date], "MM" ),
	    "Monthnum", MONTH ( [Date]),
	    "Monthnumber", FORMAT ( [Date], "MM" ),
	    "YearMonthnumber", FORMAT ( [Date], "YYYY/MM" ),
	    "YearMonthShort", FORMAT ( [Date], "YYYY/mmm" ),
	    "MonthNameShort", FORMAT ( [Date], "mmm" ),
	    "MonthNameLong", FORMAT ( [Date], "mmmm" ),
	    "DayOfWeekNumber", WEEKDAY ( [Date] ),
	    "DayOfWeek", FORMAT ( [Date], "dddd" ),
	    "DayOfWeekShort", FORMAT ( [Date], "ddd" ),
	    "Quarter", "Q" & FORMAT ( [Date], "Q" ),
	    "YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ),
	"MonthofYear", FORMAT( [Date], "mmmm-yyyy")
	)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Paulyeo11
Impactful Individual
Impactful Individual

Hola Ryan

   CALENDARIO (fecha(2020,1,1), fecha(2020,12,31)),

¿Puedo pedirle la línea de código anterior, es decir que durante 2021 Ene 1 , necesito modificar manualmente la fecha anterior ?

Si su respuesta es Sí , que cualquier manera puede hacerla dinámica ?

@Paulyeo11

puedes usar DAX, algo como abajo

calendar(min(table[salesdate]),max(table[salesdate]))

o usar calendarauto

https://docs.microsoft.com/en-us/dax/calendarauto-function-dax





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Paulyeo11
Impactful Individual
Impactful Individual

Hola Señor

Tienes razón, necesito crear el calendario maestro y luego importarlo ya que no es tan diffcuilt.

Paul

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.