Hey guys,
I have this measure, Total Sales = SUMX( ‘Tab Sales’, ‘Tab Sales’[UnitPrice] * ‘Tab Sales’[Qty] )
What i would like to do in a measure, not in a column, something like this:
Hey @Harsh
Thank you for answering me. I’ve tried your solution b4 and it didn’ work.
I’m attaching the xl and the pbi file.
Thank you very much
Pedrotest.pbix (36.5 KB) test.xlsx (14.9 KB)
The “Total Sales” figure which you’ve been getting by the given formulas are correct and I really don’t see any discrepancies neither in your formula nor in mine. The solution which you’re seeing in the table is because the “Quantity” and “Unit Price” column getting summarized.
Below are the screenshots provided for the reference -
Once you uncheck the “Sum” option and select the “Don’t Summarize” option for both “Quantity” as well as “Unit Price” you’ll receive the correct results. Below are the screenshots provided for the reference.
Hey @Harsh
First of all thank you for taking the time for all this. Yes, it was a bad example what i’ve send you but you got the idea. Unfortunately it doesn’t work and i can’t understand cose all those 3 fields are in the same table, you know? I’ve tested with another value and another column and it didn’t work. The purpose of this measure is to have only positive values and as you’re showing me, your example shows no changes in totals, even if the doc type is “NC”. IT should show positive number.
Thanks a lot
Since the “Quantity” for “Doc Type = NC” was negative the totals shown was negative. But you can correct it with the formula given below and change it to a positive number. Below is the formula provided -
I’m also providing the PBIX file of my working for the reference as well as providing few links of the videos on how to correct the totals from the education portal.
Hoping you find this useful and helps you in your analysis.