Forum Discussion
fodelement
9 years agoFrequent Visitor
Reduce by percent if column value equals something.
Hello all, I am new to Power BI, and thanks to the helpful posts on here, I managed to catch up pretty quickly, so thanks for that! One issue I cannot find an answer to is as follows. I have ...
- 9 years ago
Hi fodelement,
Please create a new table by clicking New table under Modeling on Home page. Then type the formula to create a new tableNewTable=UNION(SELECTCOLUMNS(Table,"Name",Table[CreatedBy],"Value",table[Total]),SELECTCOLUMNS(FILTER(Table, Table[Index]=CALCULATE(MIN(Table[Index]),ALLEXCEPT(Table,Table[Took on Behalf of]))),"Name",Table[Took on Behalf of],"Value",Table[OtherPersonGets]))
Then add the Name as Axis, the sum(value) as value fields.
Best Regards,
Angelia
v-huizhn-msft
Microsoft Employee
9 years agoHi fodelement,
SELECTCOLUMNS function returns a table including a column which satisfy the expression. UNION creates a join table of a pair of tables.
Best Regards,
Angelia
fodelement
9 years agoFrequent Visitor
v-huizhn-msft , as always thank you for your insite. So in the code I posted, do you have an idea why it that's preventing the other person's name to be added to the column more than once?
In reality, if the other person's name is not added to the list again but their total is increased that'll be just fine. But in its current state once someone is added to the column via "taken on behalf of", they are not added again and their total dollar amount does not increase.
In reality, if the other person's name is not added to the list again but their total is increased that'll be just fine. But in its current state once someone is added to the column via "taken on behalf of", they are not added again and their total dollar amount does not increase.
- fodelement8 years agoFrequent Visitor
Hello all!!
I still need help on this, if someone can take a look for me. :)
So here is a little bump.Thanks!