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.
Afternoon,
I am trying to calculate the median/average value for these counts per quarter and then use that median or average to create some other measures. So for instance I would like to create a calculated table like the visual table below, having the quarter and the value. How would I go about doing that?
Solved! Go to Solution.
Hi powersc,
Based on your description, your requirement is to create a calculate column to achieve average value in every quarter, right? You can use DAX formula as below:
Avg = CALCULATE(AVERAGE(Table1[Value]), FILTER(Table1, Table1[Date].[Quarter] = EARLIER(Table1[Date].[Quarter])))
You can refer to PBIX file here: https://www.dropbox.com/s/88z0hvojp6wvlah/Create%20Table%20from%20Visual%20Composed%20of%20Attribute....
Best Regards,
Jimmy Tao
Hi powersc,
Based on your description, your requirement is to create a calculate column to achieve average value in every quarter, right? You can use DAX formula as below:
Avg = CALCULATE(AVERAGE(Table1[Value]), FILTER(Table1, Table1[Date].[Quarter] = EARLIER(Table1[Date].[Quarter])))
You can refer to PBIX file here: https://www.dropbox.com/s/88z0hvojp6wvlah/Create%20Table%20from%20Visual%20Composed%20of%20Attribute....
Best Regards,
Jimmy Tao
Hi @v-yuta-msft,
That is somewhat right, I am actually trying to look at the sum of decription columns and find the average over the past quarters. Currently I do not have a value column but that was easy enough to create using you example as a guild. Now to get the average I need to calculate the previous number of quarters that came before the current one. How can I figure that out?
Thanks
Nevermind I was able to figure it out using a built in function.
DATEDIFF(MIN('test system'[captured_datetime]), MAX('test system'[captured_datetime]),QUARTER)
Thanks.
User | Count |
---|---|
85 | |
84 | |
36 | |
34 | |
30 |
User | Count |
---|---|
92 | |
79 | |
66 | |
55 | |
52 |