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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.