cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ikkew Regular Visitor
Regular Visitor

Re: Wrong column totals (table)

 

@HotChilli Tried your measure (nice measure name btw), but doesn't work like expected.

  1. I can't seem to use ArtikelM[MinEenheid] without the MIN() function since it won't get recognised.
  2. Changing SUM(ArtikelM[Aantal]) to SUMX(ArtikelM, ArtikelM[Aantal]) doesn't seem to do much.

 

MinChilli = SUMX(ArtikelM, ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid])

I appreciate the effort but am still no closer

 

themistoklis New Contributor
New Contributor

Re: Wrong column totals (table)

Try this:

 

Totale jaarlijkse besparing = CALCULATE(SUMX(ArtikelM, ArtikelM[Huidig]- ArtikelM[Min])  )
ikkew Regular Visitor
Regular Visitor

Re: Wrong column totals (table)

@themistoklis Same as with the SUMX approach for the "Min" measure: the same result Man Sad

themistoklis New Contributor
New Contributor

Re: Wrong column totals (table)

Can you try this for MIN:

Min = SUMX(VALUES(Artikel[ArtikelId]), CALCULATE(SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid])))

View solution in original post

ikkew Regular Visitor
Regular Visitor

Re: Wrong column totals (table)

This... seems to work!

Could you elaborate on why your measure

 

Min = SUMX(VALUES(Artikel[ArtikelId]), CALCULATE(SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid])))

works, compared to

 

Min = SUMX(ArtikelM, ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid])

I can't thank you enough though!
Same for the others who tried to help me and pointed out the source of the issue!

themistoklis New Contributor
New Contributor

Re: Wrong column totals (table)

Generally working on Column Totals can become very tricky sometimes on PowerBI.

 

Values function returns the MIN of the each value in the field specified in the function. In this case 'Artikel[ArtikelID]'.

Without it 'total' takes the min across all ArtikelIDs 

HotChilli New Contributor
New Contributor

Re: Wrong column totals (table)

Hello again,

I see that the issue is sorted now which is great.  Can you tell me what happened when you put my measure in to your pbix because i have just re-tested (fresh copy of your pbix, added MinChilli measure) and it all worked great?

ikkew Regular Visitor
Regular Visitor

Re: Wrong column totals (table)

I'm currently refreshing my data, which takes some time (a lot of time unfortunatly +/- 2h) but I'll come back to this after it's done and probably update this reply with a screenshot. I think it's odd that it worked for you since nothing seemed to have happened on my side. Perhaps because I was trying out different things at the same time? I'm not sure..

 

Edit:

 

@HotChilli Screenshots URL

I've made screenshots of

  • (themistoklis) the working statement, where 'Min' and 'Totale jaarlijkse besparing' are having the expected totals
  • (HotChilli) the grayed out statement where the statement can't be processed, the visual isn't updated here since I didn't save the staement
  • your statement edited to work in my .pbix, where 'Min' and 'Totale jaarlijkse besparing' are having the same totals as when I started this question, thus not changing anything in my visual
HotChilli New Contributor
New Contributor

Re: Wrong column totals (table)

Ok, i understand now.  There is a bracket in the wrong place in your version of my measure. It should be

MinChilli = SUMX(ArtikelM, ArtikelM[Aantal] * ArtikelM[MinEenheid])

Highlighted
ikkew Regular Visitor
Regular Visitor

Re: Wrong column totals (table)

You're right, my mistake and my apologies.

Your answer should've been the accepted answer since it was first.

Thank you for helping me out!

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 350 members 3,368 guests
Please welcome our newest community members: