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
Pbiuserr
Post Prodigy
Post Prodigy

Average score of active items

Hello,

I have a report where business choose period, lets say they choose 08.2022
For this period, I've got lets say 1000 items active and all of them got some score (1-10). What I would like to do, is to get average score of active items per period

1 ACCEPTED SOLUTION

@Pbiuserr yep just with proper column names: 'Table'[column] = value

You could also just put these filters in the visual level filters, but I like better the approach of creating a dedicated measure like our 1st option.



2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Showcase Report – Contoso By SpartaBI

Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

View solution in original post

3 REPLIES 3
SpartaBI
Community Champion
Community Champion

@Pbiuserr if you just write a simple AVERAGE('Table'[score]) you will get the right result when putting it on a chart / matrix breaking down by months and having a filter for true on the active index column.

You can also write somehing like:
CALCULATE(AVERAGE('Table'[score], 'Table'[status] = 'Active') 
and then you don't need to use a visual filter context for this measure.



2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Showcase Report – Contoso By SpartaBI

Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Hi,

For the chart I am aware of. Its for the card. My initial thinking was just to do AVERAGE (column), but I guess its more save if it meets criteria thats its active. To indicate active (CountOfActive, its not unfrotunately the status, but the flag must be 1 and item_prd = 0, so the measure would be :

CALCULATE (AVERAGE (Table[Score], ITEM_PRD = 0, ITEM_FLG = 1) ?

 

@Pbiuserr yep just with proper column names: 'Table'[column] = value

You could also just put these filters in the visual level filters, but I like better the approach of creating a dedicated measure like our 1st option.



2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Showcase Report – Contoso By SpartaBI

Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

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.