cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Responsive Resident
Responsive Resident

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. 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Responsive Resident
Responsive Resident

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

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.

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

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

@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.
Highlighted
Responsive Resident
Responsive Resident

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

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. 
Highlighted
Responsive Resident
Responsive Resident

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

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

Highlighted
Responsive Resident
Responsive Resident

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

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.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors