Forum Discussion
joshcomputer1
9 years agoHelper V
Daily, Weekly, Month filter
I just need to know if this is possible before I start to build it. I want to send the link out to a report to a customerand have an easy to use filter for daily, weekly, and monthly. Once the user...
- 9 years ago
One way is to simply add calculated columns and separate slicers.
isDaily = DATEDIFF ( Table1[date], MAX ( Table1[date] ), DAY ) < 30
isWeekly = DATEDIFF ( Table1[date], MAX ( Table1[date] ), DAY ) < 7 * 9
v-chuncz-msft
9 years agoCommunity Support
One way is to simply add calculated columns and separate slicers.
isDaily = DATEDIFF ( Table1[date], MAX ( Table1[date] ), DAY ) < 30
isWeekly =
DATEDIFF ( Table1[date], MAX ( Table1[date] ), DAY )
< 7 * 9
- Salvador9 years agoResponsive Resident
Hi,
to add something to v-chuncz-msft, I use this for datediffs (you'd only have to replace the column names):
Collections Delay =
SWITCH (
TRUE ();
Invoices[Collection Date] < Invoices[Overdue Date]; DATEDIFF ( Invoices[Collection Date];Invoices[Overdue Date]; DAY )* -1;
Invoices[Collection Date] > Invoices[Overdue Date]; DATEDIFF ( Invoices[Overdue Date]; Invoices[Collection Date]; DAY );
0)
This way, you can avoid the limitation to datediff that forces one date to be more recent than the other (Just in case you run into that issue).