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
tabbey
Frequent Visitor

Wrong Column Totals in subtable (SELECTCOLUMNS & FILTER)

Hello,

 

I need help with the wrong column totals in my visual. 

 

I have created a subset of table using the SELECTCOLUMNS and the FILTER commands.

 

Dalsons Products = FILTER(SELECTCOLUMNS( Product, "Name", Product[Name], "Quantity Sold", Product[sold],  "Unit Price", Product[Price],  "Amount", Product[Amount],  "Year Manufactured", Product[YearMade]),  [manufacturer] = "Dalsons")

 

It worked fine except at the visual's Total. The "Quantity Sold" & "Amount" are showing a bigger number than what it should be. 

 

After 2 days of goggling, i came across potential solutions using SUMX, HasOneFilter, etc. but i was not able to get them to work.

 

Any suggestion?

 

Thank you.

 

Tab

 

 

 

 

 

 

1 ACCEPTED SOLUTION
Thejeswar
Resident Rockstar
Resident Rockstar

Hi @tabbey,

I tried recreating your scenario.

 

The Below is the sample data I used

NameSoldPriceAmountYearmadeManufacturer
A1010010002017Dalsons
B51507502018Dalsons
C812510002017Dalsons
D1313016902018Other
E1211013202017Other
F1514021002018Dalsons
G148011202017Dalsons
H11909902018Dalsons
I9706302017Other
J7503502018Other
K6301802017Dalsons
L10808002018Dalsons
M51005002018Dalsons

 

I create a table using the below similar code

 

Dalsons Products = FILTER(SELECTCOLUMNS('Product', "Name", Product[Name], "Quantity Sold", Product[sold],  "Unit Price", Product[Price],  "Amount", Product[Amount],  "Year Manufactured", Product[YearMade], "Manufacturer",'Product'[Manufacturer]), [Manufacturer] = "Dalsons")

My Output looks as shown below

dalsons.PNG

 I can see that the sum of the values match to the source data. Is that what you were not able to achieve or is there something else that you were referring to?

 

 

View solution in original post

2 REPLIES 2
Thejeswar
Resident Rockstar
Resident Rockstar

Hi @tabbey,

I tried recreating your scenario.

 

The Below is the sample data I used

NameSoldPriceAmountYearmadeManufacturer
A1010010002017Dalsons
B51507502018Dalsons
C812510002017Dalsons
D1313016902018Other
E1211013202017Other
F1514021002018Dalsons
G148011202017Dalsons
H11909902018Dalsons
I9706302017Other
J7503502018Other
K6301802017Dalsons
L10808002018Dalsons
M51005002018Dalsons

 

I create a table using the below similar code

 

Dalsons Products = FILTER(SELECTCOLUMNS('Product', "Name", Product[Name], "Quantity Sold", Product[sold],  "Unit Price", Product[Price],  "Amount", Product[Amount],  "Year Manufactured", Product[YearMade], "Manufacturer",'Product'[Manufacturer]), [Manufacturer] = "Dalsons")

My Output looks as shown below

dalsons.PNG

 I can see that the sum of the values match to the source data. Is that what you were not able to achieve or is there something else that you were referring to?

 

 

You're correct! It sounds like i had been looking at the wrong place all these times! I was able to reproduce your result. It looked like the total was wrong only if i pulled the manufacturer from the dimension. Thank you.

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.