Forum Discussion
vipinverma11
3 years agoFrequent Visitor
Need help On dax
Hi,
I have one table which has commision date & the calculated column which i am using as a slicer , and the ask here is if i will select any of the slicer so it will exclude the 2 month and rest he will calculate . for example if i select past 3 month so data will show feb, jan & dec data . but in that i want to exclude feb and jan data & show only decemeber data . Same applicable for 3-6 month , 6-9 month so on.
And like if i do multi select like past 3 month & 3-6 month so logically it will show complete six month data from today feb to last oct. so there i also want to exclude 2 latest month data.
2 Replies
- SadaqatUllahNew Member
- In the table that contains the Commission Date column, add a calculated column with the following DAX formula:ExcludeLast2 =
IF(
AND(
CommissionDate >= EOMONTH(TODAY(),-3)+1,
CommissionDate < EOMONTH(TODAY(),-1)+1
),
CommissionDate,
BLANK()
)
2. In the report, use the calculated column as the basis for your visualization and the Commission Date column as the slicer.This way, whenever you select a value in the slicer, the calculated column will only show Commission Dates from 2 months ago or earlier.
- vipinverma11Frequent Visitor
Thanks for your response,. but that will not work it's returning the same date as mentioned in commision date column
- In the table that contains the Commission Date column, add a calculated column with the following DAX formula:ExcludeLast2 =