Forum Discussion
clubspec
6 years agoHelper III
Simple GP display on Matrix
Hi Guru, I have tried many different ways trying to build a simple PL with Gross Profit on a matrix but no success. I tried using SWITCH measure to nominate the measures displaying on the matrix...
- 6 years ago
Hi clubspec ,
You could try below measure to get minus value.
group mins = if(HASONEVALUE('Table'[GroupB]),CALCULATE(SUM(GL[Amount]), FILTER(GL,GL[GL]=RELATED('Table'[GL]))), CALCULATE(SUM(GL[Amount]), FILTER(GL,GL[GL]=RELATED('Table'[GL])&& RELATED('Table'[GroupB])="R"))-CALCULATE(SUM(GL[Amount]), FILTER(GL,GL[GL]=RELATED('Table'[GL])&& RELATED('Table'[GroupB])="E")))Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
6 years agoSuper User
clubspec , I think this M-M join causing it. This should have solved the purpose but not
Display = sumx(SUMMARIZE(Map,Map[group],Map[Desp],"_1",SWITCH(VALUES(Map[Group]),1,[Amt],2,[Rev],3,[Exp],4,[Rev]-[Exp])),[_1])
Create a bridge table and try
https://www.seerinteractive.com/blog/join-many-many-power-bi/
- clubspec6 years agoHelper III
Hi amitchandak ,
Tried your measure but no luck. Is my "Map" table set up correctly for the purpose? If not how would you change it?
Thanks,
Ray