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

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

Reply
Anonymous
Not applicable

Problem using all in a formula

Hi all,

I have troubles calculating a progress state at a certain date when another date is selected in a segment.
This is my model :
pb perf.png

My data set can be like this :

Table follow_criticity_activity :

id_activitylib_criticitydate_end_criticity
1critic this month to do within 1 month2023/08/31
1critic last month to do within 1 month2023/07/31

 

table activity :

id_activity
1

 

planif_activity:

id_activitydate_alimprogressdate_end
12023/07/28not started2023/07/28
 

2023/07/29

not started2023/07/28
12023/07/30in progress

2023/07/28

12023/07/31in progress2023/07/28
12023/08/01finished2023/08/01

 

ref_alim :

date_alimlib_date
2023/07/282023/07/28

2023/07/28

2023/07/28
2023/07/282023/07/28
2023/07/31end of previous month
2023/08/01today

 

I have a matrix containing planif_activity table's rows, and two segments can act on it : ref_alim.lib_date (ordered by ref_alim.date_alim) and follow_criticity_activity.lib_criticity.


I want to display in the matrix a progress state (if activity is finished then 1 else 0) based on planif_activity.progress and planif_activity.date_end at the date selected on segment ref_alim.lib_date (no problem on that), and at the follow_criticity_activity.date_end_criticty wich depend on the second segment follow_criticity_activity.lib_criticity regardless of the first segment (I can't get it out).

 

For exemple, if ref_alim.lib_date='today' and follow_criticity_activity.lib_criticity='critic last month to do within 1 month', I would like to have on my matrix :

planif_activity.id_activityplanif_activity.date_endprogress state at ref_alim.lib_date='today'progress state at follow_criticity_activity.date_end_criticty where follow_criticity_activity.lib_criticity='critic last month to do within 1 month'
12023/08/0110



I tried this measure to determined if an activity is finished (=1) or not (=0) at the follow_criticity_activity.date_end_criticty :
finished_activity =
var msr_end_date =

CALCULATE(min(follow_criticity_activity[date_end_criticity]),
filter(follow_criticity_activity, follow_criticity_activity[lib_criticity]=SELECTEDVALUE(follow_criticity_activity[lib_criticity])))


return CALCULATE(Count(planif_activity[id_activity])
,FILTER(CALCULATETABLE(planif_activity, REMOVEFILTERS(ref_alim)),
planif_activity[progress])="FINISHED" && planif_activity[date_alim]=[msr_end_date ])
)

But I have two rows displayed instead of one :

planif_activity.id_activityplanif_activity.date_endprogress state at ref_alim.lib_date='today'progress state at follow_criticity_activity.date_end_criticty where follow_criticity_activity.lib_criticity='critic last month to do within 1 month'
12023/08/011 
12023/07/28 0

 

Do you have an idea how to do that ?

Thank you in advance.

Alice

3 REPLIES 3
Anonymous
Not applicable

Hi all,

 

Does someone have an idea ?

 

Many thanks !

Anonymous
Not applicable

Hi @Anonymous ,

The last two fields [progress state at ref_alim.lib_date='today'] and [progress state at follow_criticity_activity.date_end_criticty where follow_criticity_activity.lib_criticity='critic last month to do within 1 month'] are the count of activities? What's the calculation logic? Which conditions need to be fulfilled?

vyiruanmsft_0-1692338653952.png

The conditions should be?

  • planif_activity[progress])="FINISHED"
  • follow_criticity_activity.lib_criticity='critic last month to do within 1 month'
  • ref_alim.lib_date='today'

Best Regards

Anonymous
Not applicable

Hi,


Thank you for your reply.
Here is my pbix file : https://we.tl/t-HWlyzNaBh0
I want to have the progress of this configuration :

AR_Coordo_1-1692780283778.png

Into this matrix at a different configuration :

AR_Coordo_4-1692780675717.png

 

 

To have this result :

AR_Coordo_2-1692780475031.png

 

Thank you in advance for your help.
Alice

 

 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.