Forum Discussion

tarolz132q's avatar
tarolz132q
New Member
3 years ago
Solved

Comparative Analysis by different values in a same dimension using Summarize with FILTER

Hi,

In order to do the compartive analysis I've created number of dimensions that assist me to differniate between the groups. for instance:

 

filters:

dimensions:

 

In order to create a group that filters only the specific dataset I've created measures like below - 

avg num matches version 1 = CALCULATE(sum(V_REPORTS_VERSIONS_COMPARISON[NUM_MATCHES])/COUNT(V_REPORTS_VERSIONS_COMPARISON[USER_ID]),all('V_ETL_DIM_CURRENT_VERSION_ORDER'),ALL('V_ETL_DIM_INSTALL_VERSION_ORDER_3'),ALL('VARIATION_2'),ALL('VARIATION_3'),ALL('zEXPERIMENT_2'),ALL('zEXPERIMENT_3'))
 
ALL regarded all the dimensions I wanted to ignore!!
 
Now my problem that I cant do it a complex measure That use summarize - 
avg_num_matches_versions_retention_day =
CALCULATE(
  sumx(SUMMARIZE('V_REPORTS_VERSIONS_COMPARISON_RETENTION',V_REPORTS_VERSIONS_COMPARISON_RETENTION[RETENTION_DAY],"calculated column",
  CALCULATE(sum(V_REPORTS_VERSIONS_COMPARISON_RETENTION[NUM_MATCHES]))/CALCULATE(sum(V_REPORTS_VERSIONS_COMPARISON_RETENTION[NUM_USERS]))), AVERAGE([calculated column])),
  FILTER (
        ALL('V_REPORTS_VERSIONS_COMPARISON_RETENTION'[RETENTION_DAY]),
         'V_REPORTS_VERSIONS_COMPARISON_RETENTION'[RETENTION_DAY] <= MAX('V_REPORTS_VERSIONS_COMPARISON_RETENTION'[RETENTION_DAY])))
 
 
How I Use the filter here???
 
Please help!!

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi tarolz132q ,

     

    The first parameter of SUMMARIZE() is the table, and you can nest FILTER() outside of it, like this:

    SUMMARIZE(
        FILTER('Table','Table'[column1]=xxx),
        'Table'[column2],
        "abc",
        ...
    )

    If I have misunderstood your needs, please feel free to contact me.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi tarolz132q ,

     

    The first parameter of SUMMARIZE() is the table, and you can nest FILTER() outside of it, like this:

    SUMMARIZE(
        FILTER('Table','Table'[column1]=xxx),
        'Table'[column2],
        "abc",
        ...
    )

    If I have misunderstood your needs, please feel free to contact me.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum