Forum Discussion

mrlex's avatar
mrlex
New Member
3 years ago

Creating a table of averages based on two categories

Stuck on this one and I am a little unclear whether it is best to do this with DAX or in the query editor.
Creating new tables with formulas is a little new for me. 

I have a large table with values like so:


Table Name: Document Views

TopicSubtopic  Document  Views  Clicks  Likes  
PowerBI  DAXDoc 11523
PowerBIDAXDoc 22035
ExcelPivot Tables  Doc 32652
PowerBIMDoc 42211
ExcelPivot TablesDoc 51125


I want to create a new table with averages across the Topic and Subtopic. Something like this:

TopicSubtopicAvg. Views  Avg. Clicks  Avg. Likes  
PowerBI  DAX17.52.54
PowerBIM2211
ExcelPivot Tables  18.53.53.5

 

Can anyone recommend the best approach for this? 
Really appreciate anyone who can help me!!

1 Reply

  • Hi,

    You just need to put your Topic and Subtopic fields in a new table visual in power bi and put a measure in the table visual as well which its fomula should be like below:

     

    AverageView=

    AVERAGE('TABLE'[VIEWS])
     
    And similar for the other measures.
     
    If this answer solves your problem, please mark it as an accepted solution so the others would find what they need easier.
    Regards,
    Loran