The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi guys,
I have values for 2019,2020,2021 and 2022 years. I want to calculate monthly and cumulative average for per year but the years are seperately each other. Is there a Dax formula for this? In a one table, I wanna calculate just 2019 or 2020 or 2021 or 2022. For cumulative, I have tried following formula but when i filter with year, It doesn't calculate just the filtered year, It only shows values of filtered yar.
Thank you.
Solved! Go to Solution.
Hi guys, I have just changed ALL() function to ALLSELECTED() function, and it's worked.
Kümülatif Setup Hariç Ortalama Üretim Adeti = CALCULATE(AVERAGE('2022 H4'[Üretim Adeti]),FILTER(ALLSELECTED('2022 H4'),'2022 H4'[TARİH] <= MAX('2022 H4'[TARİH])),'2022 H4'[SETUP] <> "S")
Hi guys, I have just changed ALL() function to ALLSELECTED() function, and it's worked.
Kümülatif Setup Hariç Ortalama Üretim Adeti = CALCULATE(AVERAGE('2022 H4'[Üretim Adeti]),FILTER(ALLSELECTED('2022 H4'),'2022 H4'[TARİH] <= MAX('2022 H4'[TARİH])),'2022 H4'[SETUP] <> "S")
You can use the DatesBetween function to get the a specific year, for example this would return only 2019 (copied from your formula)
Kümülatif Setup Hariç Ortalama Üretim Adeti = CALCULATE(AVERAGE('2022 H4'[Üretim Adeti]),DatesBetween(Table[Date],"1/1/2019","12/31/2019"))
I have tried as your suggestion. But in graph, it shows values month by month. I wanna show values cumulative month by month with another line. What kind of DAX formula would I use?
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |