Forum Discussion
manikumar34
6 years agoSolution Sage
Same value is reflecting from previous PC while comparing PC wise data
Hello,
I am comparing PC wise data on my dataset. I have the C OIL 200 in my Last PC data whereas I don't have the C OIL 200 in my SUB SUB GROUP in current PC. So, it should be blank for Present PC or Null but it is reflecting the LastPC value.
Please help me regard this .
I want to show the value as "0" or Blank.
Thanks in Advance.
It was due to I had used SUMX and comparing both previous and current values on the same Matrix. Tweaked the DAX a little to avoid this issues.
4 Replies
- v-chuncz-msftCommunity Support
- manikumar34Solution Sage
no,it's not helpful.
Let me help you with my DAX
Current PC Contribution Per Ton =var _num= SUMX(Sheet1,IF(Sheet1[pc_finyr]=MAX(Sheet1[pc_finyr]),(Sheet1[Total Sales]+Sheet1[Discount]+Sheet1[ Total Cost ]+Sheet1[NR Expenses]+Sheet1[Ttl Prov]+Sheet1[ Manufacturing Contribution/Royalty of Chandrika ]),0))var _den = SUMX(Sheet1,IF(Sheet1[pc_finyr]=MAX(Sheet1[pc_finyr]),Sheet1[Qty in Ton Adjusted],0))returnIF(_num=0,0,DIVIDE(_num,_den))Previous PC Contribution Per Ton =var _num= SUMX(Sheet1,IF(Sheet1[pc_finyr]=MIN(Sheet1[pc_finyr]),(Sheet1[Total Sales]+Sheet1[Discount]+Sheet1[ Total Cost ]+Sheet1[NR Expenses]+Sheet1[Ttl Prov]+Sheet1[ Manufacturing Contribution/Royalty of Chandrika ]),0))var _den = SUMX(Sheet1,IF(Sheet1[pc_finyr]=MIN(Sheet1[pc_finyr]),Sheet1[Qty in Ton Adjusted],0))returnIF(_num=0,0,DIVIDE(_num,_den))Here the value is taking where the SUB SUB GROUP is not at all present in the database for the current PC.- manikumar34Solution Sage
v-chuncz-msft Please look into the above message and help me according