Forum Discussion
"How to Automatically Update Data with DAX Excluding Weekends"
Hi, I am new to the community, and I am learning to use Power BI.
I want to create a report where the data is automatically updated with the previous day's data. In other words, if it is Tuesday, it will update with Monday's data. However, the problem is that Saturdays and Sundays are not valid, so Monday's data needs to be updated with Friday's data. I have it done statically, but I would like to know if it can be done with DAX.
Anonymous
maybe you can try to create a flag column in date table
Column =var _last=maxx(FILTER('Table','Table'[date]<today()&&'Table'[Type]="L"),'Table'[date])return if ('Table'[date]<=_last,"y")and add this new column to filter and set the value to "y"
3 Replies
- ryan_mayuSuper User
Anonymous
do you only want to update and display the last workday's data or update and include until last workday's data?
could you pls provide some sample data?
- AnonymousNot applicable
Sorry for my English.
I want to update and display until the previous last workday."I have this calendar where 'L' stands for workday and 'F' stands for holiday ."- ryan_mayuSuper User
Anonymous
maybe you can try to create a flag column in date table
Column =var _last=maxx(FILTER('Table','Table'[date]<today()&&'Table'[Type]="L"),'Table'[date])return if ('Table'[date]<=_last,"y")and add this new column to filter and set the value to "y"