Sundar Iyengar
New Member
- Joined
- Nov 24, 2022
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
I have a table for two products, four rows for each. I dropped it into Power BI Desktop and created two visuals and one slicer. I am not able to attach the Power BI model to this post. Here is the underlying table and an image of the Power BI screen:
With 'Filter 3' set to 1, the matrix visual shows products P1 and P2 in the columns and a common component in the row, with the component price for each product. In a separate visual, right next to the first, a geomean is computed of the two columns.
geomean = calculate (geomean('TestTable'[Price]), ALLSELECTED('TestTable'[Product]))
For each 'Filter 3' value, there are two entries for each product. The matrix visual is set up to show only the max of the two.
I was expecting the geomean to calculate the geomean of only the two max values as they represent the filter context. However, it computes the geomean of all four values, two for each product.
Is there a way to change the geomean DAX formula to match the filter context and max value setting of the matrix visual?
Thanks
Product | Filter 1 | Filter 2 | Component | Filter 3 | Price |
P1 | F21 | G81 | RxBolt | 1 | 0.26 |
P1 | F21 | G17 | RxBolt | 1 | 0.34 |
P1 | F21 | G81 | RxBolt | 12 | 1.26 |
P1 | F21 | G17 | RxBolt | 12 | 1.47 |
P2 | F21 | G81 | RxBolt | 1 | 1.27 |
P2 | F21 | G17 | RxBolt | 1 | 1.72 |
P2 | F21 | G81 | RxBolt | 12 | 2.03 |
P2 | F21 | G17 | RxBolt | 12 | 2.91 |
With 'Filter 3' set to 1, the matrix visual shows products P1 and P2 in the columns and a common component in the row, with the component price for each product. In a separate visual, right next to the first, a geomean is computed of the two columns.
geomean = calculate (geomean('TestTable'[Price]), ALLSELECTED('TestTable'[Product]))
For each 'Filter 3' value, there are two entries for each product. The matrix visual is set up to show only the max of the two.
I was expecting the geomean to calculate the geomean of only the two max values as they represent the filter context. However, it computes the geomean of all four values, two for each product.
Is there a way to change the geomean DAX formula to match the filter context and max value setting of the matrix visual?
Thanks