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,
I have been looking to create measure which shows Cumulative totals for LOTS and for all the months and years. I have created measure, It seems to be not working properly
The value should be around 83M, but when I used the measure, it came around 102M. Is it because, I have FY should start from 01/04/ and end with 31/03? and please could you suggest on how could I map this measure to dates comparing from Date tables instead of using from RN table and also LOts come from LOT table not from RN table please?
I have used the below measure
Hi @v-zhouwen-msft ,
The data is for whole year. So to get the data the data in moths, I am just doing (total/12) for that year. So if I pick 31/03/2024, I would like to see sum(historic value)+(current year total/12)*max(Selected month)
Hi @poornadeepthi ,
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a table
Table 2 = SUMMARIZE(ADDCOLUMNS(CALENDAR(DATE(2021,1,1),DATE(2028,12,31)),"end of month",EOMONTH([Date],0)),[end of month])
2.Use the following DAX expression to create a measure
Measure =
VAR _a = SELECTEDVALUE('Table 2'[end of month])
VAR _b = CALCULATE(SUM('Table'[RN Cost]),YEAR('Table'[Date]) < YEAR(_a))
VAR _c = DIVIDE(CALCULATE(SUM('Table'[RN Cost]),YEAR('Table'[Date]) = YEAR(_a)),12) * MONTH(_a)
RETURN
IF(ISBLANK(_a),SUM('Table'[RN Cost]),_b + _c )
3.Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @poornadeepthi ,
Regarding your question, please provide brief data and show the expected results in the form of pictures.
Hi,
I have below matrix in powerbi, which have multiple measures which has to show cumulative sums by LOT title. I have filter which shows end of months where user can pick any month and they can see cumulative totals upto that month.
The thing is, I have data in years not in months/dates.
Data
I have date calendar as well
Hi @poornadeepthi ,
I'd like to know if this is already the value for the whole year 2021 or just for this one month.
If it's a full year, then the time span of your data is years and the time span of the filter is months.
Hi @v-zhouwen-msft ,
The data is for whole year. So to get the data the data in moths, I am just doing (total/12) for that year. So if I pick 31/03/2024, I would like to see sum(historic value)+(current year total/12)*max(Selected month)
Hi @v-zhouwen-msft ,
Thanks for the quick response. But its not working in my dashboard. Lots and Dates should come from different tables as I need to sum up different values to get cumulatives for other measures. I need those values should come from different tables where I can use it for different measures and tables. I have added my sample data. Please see, when I click default, it has to show the cumulatives upto the previous months. Thanks
Hi @v-zhouwen-msft , Thanks for the measure. Its working. But the issue is,as the values in Financial years.01/04/2021 to 31/03/2022. It is summing up values in calendar year instead of financial year. Could you please suggest how to get the measure work in FY.
As you can see below, £83,539577 should come by 31/03/2024. But it is showing by 31/01/2024
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 |
---|---|
43 | |
26 | |
20 | |
14 | |
8 |
User | Count |
---|---|
75 | |
50 | |
47 | |
17 | |
17 |