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
Yanou
Helper II
Helper II

How to use Switch and Summarize with date

Hello everybody,

 

Could you tell me what is wrong in my formula measure (always for the same visual view and data model) please ?

 

I would like a measure who test some date for each project and gives 0 if the date higher and an addition if the date is lower. This maesure below is good for the total but the test on  the date is wrong. And I don’t know why.

 

 

Dépenses éligibles FAP/FHP V2 (apres T1/Date fin) = SUMX (SUMMARIZE ('SAP compta','SAP compta'[Element OTP],'Base conventions'[Date de fin]

    ),

           IF('Base conventions'[Date de fin]>=[Last date],

           ([Achat_IFA_PCS_Eligible_FAP FHP]+[Achats_Brutes_Elig._FAP FHP]+[MOE_Eligible_FHP]+[MOE_PCS_Eligible_FHP]),0

        )

)

 

 

 

Information :

Date fin = LASTDATE('Base conventions'[Date de fin])   >>>> limit date of the contract

Last date = MAX('SAP compta'[Date de document])        >>>> last Date of expenses in the data base

 

Thanks a lot.

 

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Yanou 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

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

Hello V-Zhangti,

 

Thanks for your reply. Infact I did a mistake in my question. Instead of, can you please help me to reach a formula in a calculated-created column ?

 

I have a model data. I have accounts on a column and operation dates in an other. I would like to enter the lastest date in a third column. But Power BI, in each line, has to verify if the same account (in the column) hasn't a latest date. Then, enter the same latest date for each line (for the same account). Sometimes a same accounts can be in several lines.

 

Here is a example of the issue and the problem :

 

https://we.tl/t-l6GBCmut24 

 

Thanks

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.

Top Solution Authors
Top Kudoed Authors