Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
how can I add a filter with this kind of condition
date1 > 2022-03-31 and date2 < 2022-03-31
Solved! Go to Solution.
Hi @Anonymous ,
Where would you like to use it?
1. You can add a filter to visuals, current page, and all pages.
Add a filter to a report in Power BI - Power BI | Microsoft Docs
2. You can also create two slicers and drag the two date columns into the slices.
Slicers in Power BI - Power BI | Microsoft Docs
3. In a formula, you can add code like this in place of the filter parameter of the formula, e.g.
Measure =
CALCULATE(
SUM('Table'[Value]),
FILTER(ALL('Table'),'Table'[Date1]>DATE(2022,3,31)&&'Table'[Date2]<DATE(2022,3,31))
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
@Anonymous ,
Try like
filter(Table, Table[Date1] >date(2022,3,31) && Table[Date2] < Date(2022,3,31) )
Thanks @amitchandak
is it a DAX measure ? sorry to ask basic question but how can I implement it to have the filter in the dashboard/report?
Hi @Anonymous ,
Where would you like to use it?
1. You can add a filter to visuals, current page, and all pages.
Add a filter to a report in Power BI - Power BI | Microsoft Docs
2. You can also create two slicers and drag the two date columns into the slices.
Slicers in Power BI - Power BI | Microsoft Docs
3. In a formula, you can add code like this in place of the filter parameter of the formula, e.g.
Measure =
CALCULATE(
SUM('Table'[Value]),
FILTER(ALL('Table'),'Table'[Date1]>DATE(2022,3,31)&&'Table'[Date2]<DATE(2022,3,31))
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Thanks Gao
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
98 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |