Forum Discussion
Power BI
Measure 19 = IF(COUNTROWS(VALUES('AIPL 2(Line Scan)'[MN])) = 1, SUM('AIPL 2(Line Scan)'[MN]),SUMX(VALUES('AIPL 2(Line Scan)'[MN]), 'AIPL 2(Line Scan)'[MN])) The above formula does not work when the values are not unique
9 Replies
- AnonymousNot applicablePlease help me to tackle the problem
- AnonymousNot applicable
TRY = SUMX(VALUES('AIPL 2(Line Scan)'[MN]),CALCULATE(AVERAGE('AIPL 2(Line Scan)'[MN])))
I used this formula as well but this again shows average instead of showing sum total at bottom. i have attached a screenshot.
Please check for B3 line. the total should be 69+69=138 but it shows 69 only
- AnonymousNot applicable
Hi Anonymous,
Perhaps you can take a look at the following blog about the measure formula with multiple aggregate calculation issues:
Measure Totals, The Final Word
If the above also not help, please share some dummy data and they will help us test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
- Ashish_MathurSuper User
Hi,
Share some data and show the expected result.
- AnonymousNot applicable
Hi,
Attaching here the Screenshot fyr.
Here if you see for B3 line, since the values are same for B3A & B3B line i.e 69, total is coming 69 only, ideally its should be 69+69=138.
Please help.
- Ashish_MathurSuper User
Share the download link of the PBI file.
- AnonymousNot applicable
Hi , I have been prohibited to share anything.
For your understanding, i am explaining the scenario here.
I have two tables Production & Target. In production table i have columns namely date, order number, hour1 production, line, section . In target entry table we have column namely,date order number. line, section and target. so now i have connected both the tables on the basis of date.
Now the problem here is sometime they have same target entry in the target table so instead of giving total it shows average as you can see. for that i have used the measure which has the formula TRY = SUMX(VALUES('AIPL 2(Line Scan)'[MN]),CALCULATE(AVERAGE('AIPL 2(Line Scan)'[MN])))