cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ThomasWeppler
Advocate I
Advocate I

One of my dax functions work in desktop, but doesn't update the powerBI sharepoint

Here is the Dax function:

Fraværsprocent 12 =
DIVIDE(
CALCULATE (
COUNTROWS ( 'workplanentry' ), DATESINPERIOD('workplanentry'[date], TODAY(), -12, MONTH),
'workplanentry'[title] = "Sygedag"
|| 'workplanentry'[title] = "Barn 1. sygedag"
|| 'workplanentry'[title] = "Coronasyg"
|| 'workplanentry'[title] = "off sick"
),
CALCULATE (
COUNTROWS ( 'workplanentry' ), DATESINPERIOD('workplanentry'[date], TODAY(), -12, MONTH),
'workplanentry'[title] = "Sygedag"
|| 'workplanentry'[title] = "Barn 1. sygedag"
|| 'workplanentry'[title] = "Fraværsdag"
|| 'workplanentry'[title] = "Omsorgsdag"
|| 'workplanentry'[title] = "Arbejdsdag"
|| 'workplanentry'[title] = "Skole/Kursus"
|| 'workplanentry'[title] = "Afspadsering"
|| 'workplanentry'[title] = "langtidssygemeldt"
|| 'workplanentry'[title] = "Coronasyg"
|| 'workplanentry'[title] = "off sick"
|| 'workplanentry'[title] = "dødsfald"
|| 'workplanentry'[title] = "Corona produktionsstop"
|| 'workplanentry'[title] = "Workday"
))
All my other functions works perfectly fine, but one of them doesn't work when the next day come until I press update.
I have a theory that it doesn't handle new dates well and create a mistake everytime the date changes.
How can I fix this?
2 ACCEPTED SOLUTIONS
lbendlin
Super User III
Super User III

Correct , the TODAY() function only calculates when you look at it, either via an Import Query Scheduled Refresh, or via a Direct query initiated by the user interaction.

 

That is standard behaviour.

View solution in original post

v-shex-msft
Community Support
Community Support

HI @ThomasWeppler,

I think you upload your file to SharePoint and get the file from SharePoint to power bi service, right?

If that is the case, your pbix file that hosts on SharePoint not updated. (pbix file and its dax formulas not able to update itself without external operations,you need interaction with its data model tables to activate the dax calculations)
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @ThomasWeppler,

I think you upload your file to SharePoint and get the file from SharePoint to power bi service, right?

If that is the case, your pbix file that hosts on SharePoint not updated. (pbix file and its dax formulas not able to update itself without external operations,you need interaction with its data model tables to activate the dax calculations)
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

lbendlin
Super User III
Super User III

Correct , the TODAY() function only calculates when you look at it, either via an Import Query Scheduled Refresh, or via a Direct query initiated by the user interaction.

 

That is standard behaviour.

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors