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.
Dear All,
I need help in creating a days bucket formula, which will be used in the report as a filter.
Below is the code i wrote.The problem with this is when bracket 30 is selected it shows only dates which are above 7. It does not show dates below 7 days. Same with 60 days,it shows dates above 30 days.
Date_Condition = Max(Last_Execution_Date)-Last_Execution_Date
Days_Filter = if(('Exchange'[Date_Condition]>=1 &&'Exchange'[Date_Condition]<=7),7,if(('Exchange'[Date_Condition]>=1 && 'Exchange'[Date_Condition]<=30),30,if(('Exchange'[Date_Condition]>=1 && 'Exchange'[Date_Condition]<=60),60)))
Thank you both for your response. Please find the link to sample information. User Name and Last Activity date have to be displayed in the table. Based on the slicer selection,the user and last activity date have to be filtered.
https://onedrive.live.com/?id=1F5A3C32EB7ABDBA%21104&cid=1F5A3C32EB7ABDBA
You cannot do that by creating a calculate column using IF(). Try the following method:
1. Create a "Slicer Table" with Enter Data, enter value, 7,30,60.
2. Create a measure.
Measure = CALCULATE(MAX([Date_Condition]),FILTER('Table',[Date_Condition]<=SELECTEDVALUE('Slicer Table'[Slicer])))
3. Create a slicer with the Slicer column from the new table to filter.
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@V-pazhen-msft Created the measure and slicer. When a range is selected in the filter it is also displaying other ranges,and they are showing as empty. When a selection is made, other ranges should not be displayed on the table.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |