Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
First, I begin by thanking you for your answers and support for all those who are passionate about Power BI.
Please, as it is indicated in this two attached files below, I would like to display the sum of last 12 months, ie when I tick in my report the month of May 2018, I would like to calculate the average from last 12 months counting from May (ie from June 2017 -> May 2018).
But as you look in the attached files below, for the normal sum formula and the sum of last 12 months always I had the same result !!!!! which is too weird
Look at these two attached files below.
Thank you a lot.
Cordially.
Solved! Go to Solution.
Hi @Anonymous ,
To update your measure as below.
Consomation_Matiere12Mois2 = VAR md = MAX ( 'BI Date'[Date] ) VAR d = CALCULATE ( MAX ( 'BI Date'[Date] ), FILTER ( ALL ( 'BI Date' ), DATEDIFF ( 'BI Date'[Date], md, MONTH ) = 12 ) ) RETURN SUMX ( FILTER ( ALL ( 'BI Date' ), 'BI Date'[Date] <= md && 'BI Date'[Date] >= d ), [ConsoMatiere] )
Hi @Anonymous ,
Please try to use filter in your second formula.
ConsoMatire = CALCULATE([MEASURE],FILTER(your table, your table[column]="xxxx"))
If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Hello,
I did not find a solution for this problem.
Here is the link of my .pbix file
https://drive.google.com/open?id=1rMVWw7OwXtokFvoKVOqKuey0Wx-nPJ8g
I thank you very much.
Hi @Anonymous ,
To update your measure as below.
Consomation_Matiere12Mois2 = VAR md = MAX ( 'BI Date'[Date] ) VAR d = CALCULATE ( MAX ( 'BI Date'[Date] ), FILTER ( ALL ( 'BI Date' ), DATEDIFF ( 'BI Date'[Date], md, MONTH ) = 12 ) ) RETURN SUMX ( FILTER ( ALL ( 'BI Date' ), 'BI Date'[Date] <= md && 'BI Date'[Date] >= d ), [ConsoMatiere] )
Hello,
I am stuck to solve this problem.
your solution it did not work
Please help me
Thank you.
Hello,
I used this solution: what do you think?
Do these two requests give the correct result or not?
Here is my link:
https://drive.google.com/open?id=1UCVgCkz-ZELGeerI3IV0ezlsnc00InYL
Thank you.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |