Forum Discussion
Anonymous
5 years agoNot applicable
Filter by measure
Hello, I am looking for a way to count the number of distinct lines following a measurement, An annual data set is retrieved in the same table allowing to make measurements vs previous years, Annu...
- Anonymous5 years ago
I find the solution
Pris + Reste P A = CALCULATE(SUM(COMPTEUR_RS[Repos Compensateur Pris [jours]]])+SUM(COMPTEUR_RS[Repos Compensateur Reste à prendre [jours]]]);FILTER(COMPTEUR_RS;YEAR(COMPTEUR_RS[Période])=SELECTEDVALUE('DATE'[Année])))Total positifs = SUMX(VALUES(COMPTEUR_RS[Agent ID]);IF(CALCULATE(SUMX(COMPTEUR_RS;[Pris + Reste P A])-SUMX(COMPTEUR_RS;[Pris + Reste P A-1]))<0;0;CALCULATE(SUMX(COMPTEUR_RS;[Pris + Reste P A])-SUMX(COMPTEUR_RS;[Pris + Reste P A-1]))))
Anonymous
5 years agoNot applicable
Thanks for the measurement but it gives me the same result as the year A measurement.
A measurement. And do not filter me any more the negative values that I do not count any more.
Anonymous
5 years agoNot applicable
Hi Anonymous ,
If you want to put the measure2 in the table visual that shows 163 for each row, you could modify the measure2 as below.
Measure 2 = SUMX(ALL('Table'),[Measure])
Measure1 is work for measure2, you can remove it from the visual and use A-(A-1) instead.
Best Regards,
Jay
- Anonymous5 years agoNot applicable
I do not achieve the same result as you in my case. Probably in my A-measure I use time intelligence. I don't know. Here is my pbix shared from my drive, can you look at it?
https://drive.google.com/drive/folders/1Akd6m-BNNRdCtau64eBQ3swdlhq6vbzF?usp=sharing
- Anonymous5 years agoNot applicable
I find the solution
Pris + Reste P A = CALCULATE(SUM(COMPTEUR_RS[Repos Compensateur Pris [jours]]])+SUM(COMPTEUR_RS[Repos Compensateur Reste à prendre [jours]]]);FILTER(COMPTEUR_RS;YEAR(COMPTEUR_RS[Période])=SELECTEDVALUE('DATE'[Année])))Total positifs = SUMX(VALUES(COMPTEUR_RS[Agent ID]);IF(CALCULATE(SUMX(COMPTEUR_RS;[Pris + Reste P A])-SUMX(COMPTEUR_RS;[Pris + Reste P A-1]))<0;0;CALCULATE(SUMX(COMPTEUR_RS;[Pris + Reste P A])-SUMX(COMPTEUR_RS;[Pris + Reste P A-1]))))