cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tomasmartinek
Frequent Visitor

Adobe Connector and date range parameter

Hello,

 

I am trying to change date to relative in adobe analytics connector from "anything" (last 60 days or from 1/1/2021) to today.

 

{Cube.ApplyParameter, "DateRange", {#date(2021, 7, 13), #date(2021, 7, 13)}},

 

I tried change date to 2021, 12, 31 - but with errors and tried used LocalNow, but I have errors here

{Cube.ApplyParameter, "DateRange", {#date(2021, 7, 13), #date(DateTime.LocalNow())}},

 

Is here any solution how to create auto update time in adobe analytics connector?

 

Thanks

Tomas

Thank

2 ACCEPTED SOLUTIONS
ImkeF
Super User
Super User

Hi @tomasmartinek ,

use Date.From ( DateTime.LocalNow() ) instead of #date.

 

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

View solution in original post

V-pazhen-msft
Community Support
Community Support

@tomasmartinek "
This is because you your first date return Date only, and DateTime.LocalNow() returns Date and Time. Change it to the expression below.

 

DateTime.Date(DateTime.LocalNow())

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@tomasmartinek "
This is because you your first date return Date only, and DateTime.LocalNow() returns Date and Time. Change it to the expression below.

 

DateTime.Date(DateTime.LocalNow())

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

ImkeF
Super User
Super User

Hi @tomasmartinek ,

use Date.From ( DateTime.LocalNow() ) instead of #date.

 

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

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors