Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
sebsenciel
Frequent Visitor

Problem Power BI : merge period in table...

Hello to all,

 

I can't do the following under powerbi 😞
Can you help me please ?
I will try to detail my problem as clear as possible 🙂


My data model is simple: I have only one table, namely the PROJECT table (see attached diagram)

this table has two columns :
- date column
- project tasks column (values T1 and T2)

Each task is associated with a date.

Ok.

This project was carried out over a period of time between a min and max date
The min date of the project : in green
the max date of the project in red

 

Target : for each task, I would like to associate the period of the corresponding project, indicating for each date of the period if there was an associated task (yes ==> 1, no ==> 0).
See target on the right !

I tried to merge with a calendar table, but I couldn't do it.

 

Thanks for your help
Sébastien

 

 

problem.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @sebsenciel ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a table.

 

 Table = GENERATE(VALUES(Project[Tache]),VALUES(Calendrier[Calendrier Project])) 

 

(3) We can create a calculated column.

 

Column = var a=FILTER(Project,[Tache]=EARLIER('Table'[Tache])) var b=SUMMARIZE(a,[Date]) return IF([Calendrier Project] in b,1,0) 

 

(4) Then the result is as follows.

vtangjiemsft_0-1671095461170.png

 

Best Regards,

Neeko Tang

If this post  helps, then please considerAccept it as the solution  to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi  @sebsenciel ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a table.

 

 Table = GENERATE(VALUES(Project[Tache]),VALUES(Calendrier[Calendrier Project])) 

 

(3) We can create a calculated column.

 

Column = var a=FILTER(Project,[Tache]=EARLIER('Table'[Tache])) var b=SUMMARIZE(a,[Date]) return IF([Calendrier Project] in b,1,0) 

 

(4) Then the result is as follows.

vtangjiemsft_0-1671095461170.png

 

Best Regards,

Neeko Tang

If this post  helps, then please considerAccept it as the solution  to help the other members find it more quickly.

Hello v-tangjie-msft,

 

Thank's a lot for your answer.

very NICE !!!!

have a great holiday season 😉

Best regards

Sebastien

sebsenciel
Frequent Visitor

Hi amitchandak,

thank you for your feedback
I will look at your answer and get back to you if I have any questions,
Thank you

 

Sébastien

amitchandak
Super User
Super User

@sebsenciel , Try a measure like below with date table

 

calculate(Sumx(filter(Date, Date[Date] >= Minx(filter(allselected(Table), Table[Tache] = max(Table[Tache])), Table[Date]) && Date[Date] <= Maxx(filter(allselected(Table), Table[Tache] = max(Table[Tache])), Table[Date])), if(Date[Date] = Max(Table[Tache]) ,1,0)))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.