Forum Discussion
Arnault_
3 years agoResolver III
MIN value / Virtual table
Hi All, Here is my problem. I have a simple table with transactions with different supply centers and different prices. I have created a table where I have the 3 supply centers and the average pri...
- 3 years ago
Price (Average) - MIN All Supply Center v2 = MINX ( CALCULATETABLE( ADDCOLUMNS ( VALUES ( Data[supply_center] ), "Price", [Price (Average)] ), REMOVEFILTERS(Data) ), [Price] ) - 3 years ago
Hi there!
Try this!
Price (Average) - MIN All Supply Center v3 = VAR _Value = MINX ( ALL ( Data[supply_center] ), CALCULATE( AVERAGE( Data[unit_price] ) ) ) RETURN IF( HASONEVALUE( Data[supply_center] ), _Value, BLANK() )Should return the following:
Let me know if that helps!
- 3 years ago
I finally found the solution myslef.
Price (Average) MIN v3 = CALCULATE ( MINX ( VALUES ( Data[supply_center] ) , [Price (Average)] ), ALL (Data[supply_center] ) )
Greg_Deckler
3 years agoCommunity Champion
Arnault_ This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.