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
badluckmath
Frequent Visitor

AYUDA NECESARIA: OBTENCIÓN DE DATOS DE LA API

Tengo que extraer un dato de un origen web que proporciona una webAPI para reducir los datos, aquí hay una placa domestica:

https://hq.appsflyer.com/export/com.greatapp/partners_report/v5?api_token=xxxx
&from-2018-04-09&2018-05-09&media_source-googleadwords_int

El problema es que, necesito insertar un rango de datos en este enlace, como se puede ver en la línea "desde -2018-04-09&to-2018-05-09".

Estos datos se utilizarán para realizar informes desde una fecha determinada hasta la fecha de hoy. Pero necesito hacerlo sin tener que cambiar la url todos los días.

¿Hay alguna manera de hacer esto usando DAX?

Aquí está un ejemplo de un tirón:

Sem título.png

Traté de poner una fórmula que me da el formato de tiempo que necesitaba entre la url como esta :

".... from-2020-07-01&to-"& FORMAT(TODAY(), "AAAA-MM-DD")&"&additional_fields-keyword_id,store_reinstall,...."

pero no funcionó.

¡Por favor, ayúdenme!

3 REPLIES 3
amitchandak
Super User
Super User

@ImkeF , ¿Puedes ayudar con esto.

@badluckmath , @Lor , mientras que imkef tiene un vistazo. Refiera si esto puede ayudar, la porción "faking out" del link -http://blog.datainspirations.com/2018/02/17/dynamic-web-contents-and-power-bi-refresh-errors/

Si bien este enlace podría no ser de gran ayuda...

Hola a todos

mientras lo hace en el editor de consultas, debe usar el lenguaje M (Power Query) y no DAX.

Esta es la forma de recuperar la fecha de hoy formateada como texto en el formato deseado:

Date.ToText ( Date.From ( DateTime.LocalNow() ) , "yyyy-MM-dd" )

Si desea actualizar estas consultas en el servicio Power BI, debe realizar más ajustes como se menciona en el artículo que @amitchandak ha publicado.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Anonymous
Not applicable

Tengo exactamente la misma pregunta. Hasta ahora no he visto ninguna solución.

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.