Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hola, tengo un sistema simple que almacena los siguientes datos:
| Fecha | Territorio | Consultor |
| 2/3/2020 | AS - Nueva Inglaterra | Paul |
| 2/3/2020 | AS - Llanuras Centrales | Nick |
Habrá filas agregadas al establo solo cuando se realice un cambio en los datos. Por ejemplo, si cambié el nombre de Consulant por territorio de Nueva Inglaterra el 2/5/2020:
| Fecha | Territorio | Consultor |
| 2/3/2020 | AS - Nueva Inglaterra | Paul |
| 2/3/2020 | AS - Llanuras Centrales | Nick |
| 2/5/2020 | AS - Nueva Inglaterra | Ryan |
| 2/5/2020 | AS - Llanuras Centrales | Nick |
Dado que no hubo ningún cambio en 2/4/2020, no hay datos para esa fecha.
¿Hay alguna manera dentro de Power BI de que podamos aumentar/generar datos para estas fechas que faltan y para cada nuevo día?
Ejemplo: de 2/3 a 2/6
| Fecha | Territorio | Consultor |
| 2/3/2020 | AS - Nueva Inglaterra | Paul |
| 2/3/2020 | AS - Llanuras Centrales | Nick |
| 2/4/2020 | AS - Nueva Inglaterra | Paul |
| 2/4/2020 | AS - Llanuras Centrales | Nick |
| 2/5/2020 | AS - Nueva Inglaterra | Ryan |
| 2/5/2020 | AS - Llanuras Centrales | Nick |
| 2/6/2020 | AS - Nueva Inglaterra | Ryan |
| 2/6/2020 | AS - Llanuras Centrales | Nick |
¡Gracias!
Solved! Go to Solution.
Echa un vistazo a lo que he hecho en este archivo PBIX.
Básicamente, hice esto:
Se ve así en Power Query:
Sólo lo hace desde la primera hasta la última fecha. Su ejemplo pasa por una fecha fizcana en el futuro. Puede lograr esto en mi consulta cambiando el paso "Latest calculado" de:
O podría poner hoy allí con DateTime.Date(Date.TimeLocalNow()) y omitir la búsqueda de la última fecha.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingNo es una gran manera. Pero si quieres todas las fechas para cada uno
Create a new date table
Date1= calendar(min(table[Date]),max(table[Date]))
Create table with cross join
table2 = crossjon(Date1,summarize(table,table[Territory],table[Consultant]))
Aprecia tus Felicitaciones.
Echa un vistazo a lo que he hecho en este archivo PBIX.
Básicamente, hice esto:
Se ve así en Power Query:
Sólo lo hace desde la primera hasta la última fecha. Su ejemplo pasa por una fecha fizcana en el futuro. Puede lograr esto en mi consulta cambiando el paso "Latest calculado" de:
O podría poner hoy allí con DateTime.Date(Date.TimeLocalNow()) y omitir la búsqueda de la última fecha.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingTuve otra idea. Esto no se prueba al 100%. Me siento mejor con mi solución anterior, pero esto hará todo en una consulta, pero debe probar para diferentes escenarios (algunas regiones no existen, por ejemplo.)
No puedo cargar un nuevo archivo PBIX en este momento. Sin embargo, simplemente cree una nueva consulta en blanco, vaya al Editor avanzado, elimine todo y pegue esto en:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtI31jcyMDJQ0lFyDFbQVfBLLVdwzUvPScxLAQoFJJbmKMXqYCpzTs0rKUrMUQjISczMKwaK+mUmZytAlZriMTGoMjEPqzJcJsYCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Date = _t, Territory = _t, Consultant = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Territory", type text}, {"Consultant", type text}}),
#"Calculated Earliest" = List.Min(#"Changed Type"[Date]),
#"Calculated Latest" = List.Max(#"Changed Type"[Date]),
#"Full list of dates" = {Number.From(#"Calculated Earliest")..Number.From(#"Calculated Latest")},
#"Table of Dates" = Table.FromList(#"Full list of dates", Splitter.SplitByNothing(), {"Date"}, null),
#"Changed Type1" = Table.TransformColumnTypes(#"Table of Dates",{{"Date", type date}}),
#"Cartesian Join to original table" = Table.AddColumn(#"Changed Type1", "Cartesian Join of full table", each #"Changed Type"),
#"Expanded Cartesian Join of full table" = Table.ExpandTableColumn(#"Cartesian Join to original table", "Cartesian Join of full table", {"Date", "Territory", "Consultant"}, {"Date.1", "Territory", "Consultant"}),
#"Added Is Match" = Table.AddColumn(#"Expanded Cartesian Join of full table", "Is Match", each [Date] = [Date.1]),
#"Date 1" = #"Added Is Match"[Date.1],
#"Unique Original Dates" = List.Distinct(#"Date 1"),
#"Added In Original List" = Table.AddColumn(#"Added Is Match", "In Original List", each List.PositionOf(#"Unique Original Dates", [Date])),
#"Added filter to remove unneeded items" = Table.AddColumn(#"Added In Original List", "Custom", each [Is Match] = true or [In Original List] = -1),
#"Filtered out unneeded items" = Table.SelectRows(#"Added filter to remove unneeded items", each ([Custom] = true)),
#"Added New Consultant" = Table.AddColumn(#"Filtered out unneeded items", "New Consultant", each if [In Original List] = -1 then null else [Consultant], type text),
#"Removed Other Columns" = Table.SelectColumns(#"Added New Consultant",{"Date", "Territory", "New Consultant"}),
#"Removed Duplicates" = Table.Distinct(#"Removed Other Columns"),
#"Sorted Rows" = Table.Sort(#"Removed Duplicates",{{"Territory", Order.Ascending}, {"Date", Order.Ascending}}),
#"Filled Down" = Table.FillDown(#"Sorted Rows",{"New Consultant"}),
#"Renamed Columns" = Table.RenameColumns(#"Filled Down",{{"New Consultant", "Consultant"}})
in
#"Renamed Columns"
No conseguimos encontrar tu ubicación exacta. Me golpeó esta mañana en mi auto en cómo hacer que eso suceda.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting@edhans gracias por esto! Traté de replicarlo, pero algo explotó. Tendrá una mirada más profunda.
Tendré que crear datos para ver si este modelo puede abordar desafíos como agregar nuevos territorios en el futuro
¡Gracias por tu ayuda!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.