Forum Discussion

thebigwhite's avatar
thebigwhite
Helper II
3 years ago
Solved

Aggregation Problem with Power BI

Hello I have the following issue:    I have two tables.  One with Quantity and another with values   Basically the user needs a dynamic result:  The want to have the minimum quantity for ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi thebigwhite ,

     

    Check the formulas:

    itemview = MINX(TableA,TableA[Qty])*CALCULATE(SUM(TableB[amount]),FILTER(TableB,TableB[Value]=SELECTEDVALUE(TableA[Item])))
    
    groupview = CALCULATE(MIN(TableA[Qty]),ALLEXCEPT(TableA,TableA[Item],TableA[Group]))*CALCULATE(SUM(TableB[amount]),FILTER(TableB,TableB[Value]=SELECTEDVALUE(TableA[Item])))

     

    Best Regards,

    Jay