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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.