Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi All,
I have a DATE Slicer and a Table Table1 with multiple date fields. I wanted to calculate measures based on a calendar slicer (based on start and end date) and filter the Table1 on a specific date field. Is this possible to calculate the measure dynamic during selection.
Table 1:
ID Date1 Date3 Date3
Measure 1 : COUNT(ID) based on Date1 and Based on the Slicer Selction
Measure 2 : COUNT(ID) based on Date2 and Based on Slicer selction
Can this be done without having inactive relationships with the date coulmn of the date table .?
Aju
Solved! Go to Solution.
Hi @Anonymous ,
Sorry for taking so long to reply. For some reason, my reply was not sent successfully before.
1.Create a calendar table.
Calendar = CALENDAR(DATE(2021,1,1),DATE(2021,1,11))
2.Create three measures.
Measure 1 Value = CALCULATE(COUNT('Table'[ID]),FILTER('Table',[Date1]>=MIN('Calendar'[Date])&&[Date1]<=MAX('Calendar'[Date])))Measure 2 Value = CALCULATE(COUNT('Table'[ID]),FILTER('Table',[Date2]>=MIN('Calendar'[Date])&&[Date2]<=MAX('Calendar'[Date])))Measure 3 Value = CALCULATE(COUNT('Table'[ID]),FILTER('Table',[Date3]>=MIN('Calendar'[Date])&&[Date3]<=MAX('Calendar'[Date])))
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Sorry for taking so long to reply. For some reason, my reply was not sent successfully before.
1.Create a calendar table.
Calendar = CALENDAR(DATE(2021,1,1),DATE(2021,1,11))
2.Create three measures.
Measure 1 Value = CALCULATE(COUNT('Table'[ID]),FILTER('Table',[Date1]>=MIN('Calendar'[Date])&&[Date1]<=MAX('Calendar'[Date])))Measure 2 Value = CALCULATE(COUNT('Table'[ID]),FILTER('Table',[Date2]>=MIN('Calendar'[Date])&&[Date2]<=MAX('Calendar'[Date])))Measure 3 Value = CALCULATE(COUNT('Table'[ID]),FILTER('Table',[Date3]>=MIN('Calendar'[Date])&&[Date3]<=MAX('Calendar'[Date])))
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Updated with the sample data. I have a date slicer for sel;ecting dates.
| ID | Date1 | Date2 | Date3 |
| 1 | 1/1/2021 | 1/4/2021 | 1/6/2021 |
| 2 | 1/2/2021 | 1/5/2021 | 1/7/2021 |
| 3 | 1/3/2021 | 1/6/2021 | 1/8/2021 |
| 4 | 1/4/2021 | 1/7/2021 | 1/9/2021 |
| 5 | 1/5/2021 | 1/8/2021 | 1/10/2021 |
| 6 | 1/6/2021 | 1/9/2021 | 1/11/2021 |
| Date Slicer Selected Date :1/3/2021 - 1/6/2021 | |
| Measure 1 Value = 4 | Calculation based on Date1 |
| Measure 2 value = 3 | Calculation based on Date2 |
| Measure 3 Value=1 | Calculation based on Date3 |
@Anonymous
I think you need to share sample data and also the desired result to give you the right answer
Proud to be a Super User!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.