cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Not showing data properly

I'm new to Power BI, but I've used other BI solutions in the market.

 

Anyway, I have a situation where I can't seem to work out. I've made a simplyfied example so someone can understand and help me. I've got two tables, one with purchase information such as date of purchase and unit price:purchase tablepurchase table

 

The second table contains information of how many products were bought and expected day of arrival to the costumer:

date of arrival tabledate of arrival table

 

I tried to make a simple Matrix with these informations, this is what happens:

matrixmatrix

 

As you can see, when there is no product for that respective date of arrival, it appears as blank. But, somehow, the unit price is considered in the Total. Also I've done measure called Total price:

 

 

 

 

 

 

Total price = COUNT('Date of arrival'[ID])*SUM(Purchases[Unit Price])

 

 

 

 

 

 

Take the date 01/03/2020: there are 2 products with the value of $100 each and there is a product with the value of $250. The total calculation uses the total sum of unit price and multiply with total count of products sold. So the calculation made is 100+250+50 = 400 (the 50 shouldn't be considered), take this value ans multiply with the total count of products giving: 400*3 = 1200. And I was expecting to calculate like this 2*100 + 1*250 = 450.

 

For me, this results are weird since I defined the relations between the data. 

relation.png

 

If someone can help me, I'll be very grateful.

3 REPLIES 3
Highlighted
Super User IV
Super User IV

Re: Not showing data properly

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Super User IV
Super User IV

Re: Not showing data properly

Either you have move price from one table another like these example

New Column = maxx(filter(table2,table2[Col1]= table1[col1] && table2[Col2]= table1[col2] ),table2[required_col])
New Column = maxx(filter(table1,table1[Col1]= earlier(table1[col1]) && table1[Col1]= earlier(table1[col2]) ),table1[required_col])

 

Or group data at purchase ID

Something like this

sumx(summarize(Purchase[Purchase ID], "_sum", count(ID), "_price",max([price])),[_sum]*[_price])

 

But Purchase ID should be in common dim or taken from the master table

 

Refer : https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Community Support
Community Support

Re: Not showing data properly

Hi @heronfz , 

I am not clear about your requirement, if possible could you please inform me more detailed information(such as your expected output and your sample data (by OneDrive for Business))? Then I will help you more correctly.

Please do mask sensitive data before uploading.

Thanks for your understanding and support.
Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors