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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
CesarUG
New Member

Crear una Tabla que contiene una columna de Fecha

Hola, tengo problemas para crear una tabla que contiene una fecha y unos datos, la fecha es una medida que me da la fecha del dia siguiente despues de seleccionar una fecha en el selector, es para calcular una proyeccion:

CesarUG_0-1713841572478.png  

CesarUG_1-1713841621438.png

La tabla que quiero calcular tiene esta formula

CesarUG_2-1713841679323.png

al querer crear una columna con la fecha que calcule, me sale esto, la fecha 31/12/1899, 

CesarUG_3-1713841822280.png

 

Quiza estoy usando mal el contexto y si alguien me puede ayudar con esto u otra forma, es para colocarlo en una visualizacion de linea para ver la proyeccion.

 




 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @CesarUG ,

 

There is no error in your dax formula, this is due to the nature of the calculation table, he can't get the date values that change based on the slicer values, he is rendered statically in the table view. But you can create dummy table in measure and this dummy table date is displayed normally.

Measure = 
var _table=ADDCOLUMNS(GENERATESERIES(0,23,1),"Hora",[Value],"cantidad",1,"date",[prueba fecha])
RETURN MAXX(_table,[date])

vtangjiemsft_0-1713923411793.png

Or you can display the table and date measure directly in the visual object.

vtangjiemsft_1-1713923483515.png

 

If you want to create a table display, then you need to implement it in the power query.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @CesarUG ,

 

There is no error in your dax formula, this is due to the nature of the calculation table, he can't get the date values that change based on the slicer values, he is rendered statically in the table view. But you can create dummy table in measure and this dummy table date is displayed normally.

Measure = 
var _table=ADDCOLUMNS(GENERATESERIES(0,23,1),"Hora",[Value],"cantidad",1,"date",[prueba fecha])
RETURN MAXX(_table,[date])

vtangjiemsft_0-1713923411793.png

Or you can display the table and date measure directly in the visual object.

vtangjiemsft_1-1713923483515.png

 

If you want to create a table display, then you need to implement it in the power query.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Thanks, me ayudo la solucion

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.