Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
manikumar34
Solution Sage
Solution Sage

Same value is reflecting from previous PC while comparing PC wise data

Untitled.png

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. 

 

 

 

 





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




1 ACCEPTED SOLUTION

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.





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




View solution in original post

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@manikumar34 

 

You may check if the following posts help.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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))
return

IF(_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))
return

IF(_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. 




If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




@v-chuncz-msft  Please look into the above message and help me according





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




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.





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors