cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Schéma cumulé

Bonjour,

 

Je n'arrive pas a effectué un schéma de données monétaires qui se fait de mois en mois car j'aimerais fixer des limites de date mais sa ne fonctionne pas. Lorsque je fais un DATESBETWEEN de ma colonne il me renvois comme message d'erreurs que je passe une table de valeurs. 

 

I can not make a schema of monetary data that is done from month to month because I would like to set date limits but it does not work. When I do a DATESBETWEEN of my column it returns me as error message that I pass a table of values.

 

code : 

Mesure=CALCULATE(SUM(Factures[PFCNMT]);FILTER(ALL(Factures);DATESBETWEEN(Factures[Mois.Date];DATE(2016;07;01);DATE(2017;06;31))))

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Schéma cumulé

The second argument to the FILTER function must be a scalar expression (boolean). The DATESBETWEEN function will typically return several dates.

 

In your case, the FILTER is probably not required, so the following might be what you are looking for:

 

Mesure=CALCULATE(SUM(Factures[PFCNMT])
; DATESBETWEEN( Factures[Mois.Date]; DATE(2016;07;01); DATE(2017;06;31) )
)

In case you decide to add a Dates table to your model (which is recommended) and after you created a relationship between Factures and Dates, you will be able to write the following.

 

Mesure=CALCULATE(SUM(Factures[PFCNMT])
; DATESBETWEEN( Dates[Date]; DATE(2016;07;01); DATE(2017;06;31) )
)

 

8 REPLIES 8

Schéma de valeurs cumulé

Bonjour,

 

J'ai un problème je ne arrive pas à faire un schéma avec des données Monétaires Qui se cumul de mois en mois et Qui Possède une date de fin précise. Quand je passe en paramètre une date de fin rien ne va plus.

 

Le code marche quand je ne mais pas de date de fin mais sa me fait le cumul sur toute les Annees Alors Que je aimerais Avoir un schéma pour chaque année.

 

code qui fonctionne: Mesure = CALCULATE (SUM (Factures [PFCNMT]); FILTER (ALL (Factures); Factures [Mois.Date] <= MAX (Factures [Mois.Date])))

 

code qui ne fonctionne pas : Mesure 3 = CALCULATE(SUM(Factures[PFCNMT]);FILTER(All(Factures);Factures[Mois.Date] <= DATE(2005;06;31)))

 

 

Baskar Super Contributor
Super Contributor

Re: Schéma de valeurs cumulé

Is it possible to post in English , my dear friend 

Re: Schéma de valeurs cumulé

Je n'y arriverais pas je suis nul en anglais.

 

 

eduardo Regular Visitor
Regular Visitor

Re: Schéma de valeurs cumulé

Re: Schéma de valeurs cumulé

Hello,
 
I have a problem I can not make a schema with Monetary data That accumulates from month to month and that has a specific end date. When I pass in parameter an end date nothing goes more.
 
The code works when I do not have an end date but it makes me accumulate on all the years so I would like to have a schema for each year.

Re: Schéma de valeurs cumulé

Hello,
 
I have a problem I can not make a schema with Monetary data That accumulates from month to month and that has a specific end date. When I pass in parameter an end date nothing goes more.
 
The code works when I do not have an end date but it makes me accumulate on all the years so I would like to have a schema for each year.

Re: Schéma cumulé

The second argument to the FILTER function must be a scalar expression (boolean). The DATESBETWEEN function will typically return several dates.

 

In your case, the FILTER is probably not required, so the following might be what you are looking for:

 

Mesure=CALCULATE(SUM(Factures[PFCNMT])
; DATESBETWEEN( Factures[Mois.Date]; DATE(2016;07;01); DATE(2017;06;31) )
)

In case you decide to add a Dates table to your model (which is recommended) and after you created a relationship between Factures and Dates, you will be able to write the following.

 

Mesure=CALCULATE(SUM(Factures[PFCNMT])
; DATESBETWEEN( Dates[Date]; DATE(2016;07;01); DATE(2017;06;31) )
)

 

Re: Schéma cumulé

La première solution que vous me proposait ne fait pas se que je veut. Je veut que pour le mois d'aout 2016 sa fasse juillet2016 + aout 2016 et ainsi de suite.

 

The first solution you proposed to me does not do what I want. I want for the month of august 2016 to be July 2016 + august 2016 and so on.

Helpful resources

Announcements
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Ideas
Users Online
Currently online: 225 members 3,046 guests
Please welcome our newest community members: