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
I would like to get the number of active contracts on two specific selected dates in a date slicer. Based on a suggestion from radacad, Power BI From and To Date Filtering with One Slicer - RADACAD I have created two measures on contract table DatoStart and DatoSlutt (end). The date table is without relationship. KONTRRETUR is start date of contract. KONTROPPSEIINGDATO is end date.
The result is correct as shown below.
To get the total numbers for first date the following create the following measure:
Solved! Go to Solution.
Hi @JonGunnar
Thanks for reaching out to us.
>>to count total active contracts on two selected dates
Please try this, create the 3 measures below,
selectedStart=minx(allselected('Date'),[date])
selectedEnd=maxx(allselected('Date'),[date])
count= calculate(countrows('Fact'),filter(all('Fact'),'Fact'[start date]>=[selectedStart] && 'Fact'[end date]<=[selectedEnd]))
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @JonGunnar
Thanks for reaching out to us.
>>to count total active contracts on two selected dates
Please try this, create the 3 measures below,
selectedStart=minx(allselected('Date'),[date])
selectedEnd=maxx(allselected('Date'),[date])
count= calculate(countrows('Fact'),filter(all('Fact'),'Fact'[start date]>=[selectedStart] && 'Fact'[end date]<=[selectedEnd]))
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
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.