Forum Discussion
Display minimum value on every row under group
- 8 years ago
Since making this calculation off the measures I already have doesn't work, I decided to create a new table in my DB then create calculated columns to get the answers I needed. Not ideal, but it works.
Thanks everyone for your input.
You probably need to create a new measure and use VAR along with SUMMARIZE or ADDCOLUMN to create a temp table that is essentially the table you show below but as a VAR. Then you can use MINX to grab the minimum of that and return it. You'll probably need an ALL statement in there to remove row context.
See my article here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
- mmcgwire8 years agoFrequent Visitor
Thanks for the reponse.
I did try using SUMMARIZE to create a new table then calculate based off that, which did not work. Below is the code and result. Let me know if you see anything I missed. Thanks.
MINX( SUMMARIZE(SALES_OrderSize, PROD__Master_StyleColor[_sc DESC], INVEN_Stock[Size], "tmp", DIVIDE( SUM(SALES_OrderSize[NetOrdUnits]), CALCULATE( SUM(SALES_OrderSize[NetOrdUnits]), ALLEXCEPT(SALES_OrderSize, PROD__Master_StyleColor[_sc DESC], INVEN_Warehouse[WHSE_CD], PROD_Attributes[Active Sizes], DATE_OrderEntry[Year], CUST__Master[Cust Channel], SALES_OrderHeader[OR_CODE], CUST__Master[Customer], PROD__Master_StyleColor[_key_sc] ) ) ,0 ) ), [tmp] )