The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello All,
I need to create a combined graph with as target line the average count of one field per month:
I have 2 columns DATA,ID_VENDITA
The graph must have as x=MONTH(DATA) value of the graph=COUNT(ID_VENDITA) and VALUES ROW=AVERAGE(COUNT(ID_VENDITA) by MONTH of the previous -13 months
example in December as row value i should have the avg of the count(id_vendita) of the previous 13 months since November 2020 to October 2019
How can i do it? thank you very much
@Anonymous , try with a date table
Example
Rolling 13 = CALCULATE(Average(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-13,MONTH))
Rolling 13 = CALCULATE(Average(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX(Sales[Sales Date]),-13,MONTH))
Rolling 13 till last month = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(dateadd(Sales[Sales Date],-1,month)),-13,MONTH))
Rolling 13 = CALCULATE(Average(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],EOMONTH(MAX(Sales[Sales Date])-1),-13,MONTH))
Thanks for the answear maybe my question was not really close to the necessity.
i try to explain better: in my file i have the following column:
DATE_OF_SALES | ID_SHIPMENT
what i need is to calculate the Average for every month about the avg( of the count of the ID_SHIPMENT performed in the previous .
i need to have it : consider one thing the count of the ID_RICHIESTA/month doesn't exist in the data.
Mese | Conteggio di [ID_RICHIESTA] | avg previous 13 months |
gennaio | 2848 | 2848 |
febbraio | 2870 | 2848 |
marzo | 2563 | 2859 |
aprile | 2192 | 2760 |
maggio | 2880 | 2618 |
giugno | 8887 | 2671 |
luglio | 3792 | 3707 |
agosto | 8873 | 3719 |
settembre | 1440 | 4363 |
ottobre | 1582 | 4038 |
novembre | 1334 | 3793 |
dicembre | 1140 | 3569 |
maybe thw question is differen, i need to have the average of the previous 13 month since today .
The average need to be calculate based on the count of the column ID (ID column is a text column)
the goal is to answer at the question: what is the average of the number of intervent done in the previous 13 month since today?
How can i do it?
thank you very much
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |