Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Create Table from Visual Composed of Attribute and Measure

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?   

   

Screen Shot 2018-06-08 at 4.18.07 PM.png

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

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])))

捕获.PNG 

 

You can refer to PBIX file here: https://www.dropbox.com/s/88z0hvojp6wvlah/Create%20Table%20from%20Visual%20Composed%20of%20Attribute....

 

Best Regards,

Jimmy Tao

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

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])))

捕获.PNG 

 

You can refer to PBIX file here: https://www.dropbox.com/s/88z0hvojp6wvlah/Create%20Table%20from%20Visual%20Composed%20of%20Attribute....

 

Best Regards,

Jimmy Tao

Anonymous
Not applicable

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 

Anonymous
Not applicable

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.