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.
I have a requirment to calculate average quartely wise data without considering current year data.
I have created a created a formuale to calculate the average , but its conisdering all the values.
Average For Quarters = DIVIDE(Query1[Column1],Query1[Quarter Calculation])
How we can exclude the current year values from the calculation. Similarly i need to calculate avergage monthly
without considering current year data.
Solved! Go to Solution.
Thank for the reply @v-yuezhe-msft.
I was able to solve the problem by creating a variable
Forecast = IF('Cash Flow'[FY_DC]='Cash Flow'[CurrentYear],0,'Cash Flow'[Average]).
My requirment was to show Average Quarterly wise across the years. For each quarter I had to show the forecast with Average() we will get the average for entire dataset in the visualization.
@syedsiraj10,
Do you get expected result when you create another measure using DAX below. You may need to create year column in the Query1 table.
Measurewithoutcurrentyear = CALCULATE([Average For Quarters], FILTER(Query1,Query1[Year]<YEAR(TODAY())))
There is also an example for your reference.
Measurewithoutcurrentyear = CALCULATE(SUM(Sheet5[SalesAmount]), FILTER(Sheet5,Sheet5[Year]<YEAR(TODAY())))
Regards,
Lydia
Thank for the reply @v-yuezhe-msft.
I was able to solve the problem by creating a variable
Forecast = IF('Cash Flow'[FY_DC]='Cash Flow'[CurrentYear],0,'Cash Flow'[Average]).
My requirment was to show Average Quarterly wise across the years. For each quarter I had to show the forecast with Average() we will get the average for entire dataset in the visualization.
Tough to say exactly without sample data but somewhere in your calculation you probably need to use a CALCULATE and FILTER to filter out the current year. [Year] = YEAR(TODAY())
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |