Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello 🙂
I have a dataset of different consumer studies where each row is an evaluation of a pair of products by a consumer in a specific study. My goal is to conduct t-tests to identify within each study whether the product wins, loses or is at parity with the competitor product.
Here is a sample :
Study_Pair_Key | Study_ID | Consumer_ID | Product_ID | Comp_Product_ID | Product_Score | Comp_Product_Score |
1_HA_CA | 1 | C1 | HA | CA | 5 | 3 |
1_HA_CB | 1 | C1 | HA | CB | 5 | 4 |
1_HB_CA | 1 | C1 | HB | CA | 1 | 3 |
1_HB_CB | 1 | C1 | HB | CB | 1 | 4 |
1_HA_CA | 1 | C2 | HA | CA | 3 | 6 |
1_HA_CB | 1 | C2 | HA | CB | 3 | 5 |
1_HB_CA | 1 | C2 | HB | CA | 2 | 6 |
1_HB_CB | 1 | C2 | HB | CB | 2 | 5 |
2_HA_CA | 2 | C1 | HA | CA | 4 | 7 |
2_HA_CB | 2 | C1 | HA | CB | 4 | 6 |
2_HB_CA | 2 | C1 | HB | CA | 6 | 7 |
2_HB_CB | 2 | C1 | HB | CB | 6 | 6 |
2_HA_CA | 2 | C2 | HA | CA | 5 | 2 |
2_HA_CB | 2 | C2 | HA | CB | 5 | 3 |
2_HB_CA | 2 | C2 | HB | CA | 3 | 2 |
2_HB_CB | 2 | C2 | HB | CB | 3 | 3 |
I first created a calculated column for the score gap between 2 products:
Then I have created the following measures:
Hi @alesya
Instead of expanding your dataset with additional columns for each grouping, you can create a calculated table that dynamically aggregates your WPL_measure results.
WPL_Summary =
SUMMARIZE(
'Table',
'Table'[Study_Pair_Key],
"WPL_Result", [WPL_measure]
)
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
94 | |
86 | |
78 | |
69 | |
63 |
User | Count |
---|---|
113 | |
99 | |
97 | |
64 | |
59 |