Forum Discussion
PPStar
1 year agoHelper V
Creating a custom column to filter data
Hello. I have a very very large table being imported into my dataflow. i have a lot of columns, but for this post, i will shorten it with less columns Title | Category | Date A | E ...
samratpbi
1 year agoSuper User
Hi, if you dont need those at all for your visuals, then better to filter those out in Power Query ( or source table). However in DAX, you may create below column:
Inc exc =
VAR _currDate = TODAY()
VAR _currDate2 = EDATE(_currDate,-24)
RETURN
IF(
AND(DateCategory[Date] < _currDate2,DateCategory[Category] = "B"),
"Exclude",
"Include"
)
This is how it looks after adding new column :
Hope this helps! If this help to resolve your problem, then please mark it as solution, thanks