Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
In the image left side is my table data and the right side i am expecting to display the data when my date is in between start date and end date,
If my date is > Startdate && my date <= ENd date it has to give result as 1 else 0 .
as shown in the image matrix date.
Can any on ehlp me how do i do that.
If you see this image, i could able to concateneate dates between start and end dates, the dates are perfect but i am unable to fill with 1's when date matching
First Step
I am unable to fill with 1's in between start date and end date.I think i am missing something.I am unable to attach Pbi file here. Please help me to resolve this.
Hi @Rakesh404 ,
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
CALENDAR(
DATE(2024,2,1),
DATE(2024,2,20))
2. Create measure.
Step1 =
var _min=
MINX(FILTER(ALL('Table'),'Table'[TestNO]=MAX('Table'[TestNO])&&'Table'[ProjectNo]=MAX('Table'[ProjectNo])),[StartDate])
var _max=
MAXX(FILTER(ALL('Table'),'Table'[TestNO]=MAX('Table'[TestNO])&&'Table'[ProjectNo]=MAX('Table'[ProjectNo])),[End Date])
var _mingroup=
MINX(FILTER(ALL('Table'),'Table'[TestNO]=MAX('Table'[TestNO])),[StartDate])
var _maxgroup=
MAXX(FILTER(ALL('Table'),'Table'[TestNO]=MAX('Table'[TestNO])),[End Date])
return
CONCATENATEX(
FILTER(ALL('Table 2'),
'Table 2'[Date]>=_min&&'Table 2'[Date]<=_max),'Table 2'[Date],"-"
)
Step2 =
var _step2=
CONCATENATEX(
FILTER(ALL('Table'),
'Table'[TestNO]=MAX('Table'[TestNO])),[Step1],"-"
)
return
IF(
CONTAINSSTRING(
_step2,MAX('Table 2'[Date]))=TRUE(),1,0)
3. Result:
Here's a discovery that needs to be explained to you, according to your rules, [TestNo] also belongs to 1 on 2/6/2024
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you very very much. 👏
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |