Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vipinverma11
Frequent Visitor

Need help On dax

Hi,

vipinverma11_0-1675744867226.png

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 2
SadaqatUllah
New Member

  1. 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.

Thanks for your response,. but that will not work it's returning the same date as mentioned in commision date column

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.