Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anik
Helper I
Helper I

Wrong calculation

Capture.PNG Here I've encountered a problem. In 2013, the number of sales was 12,760. When I dragged the (country) column into the Columns section, an additional blank row is created. Whatever columns (country/city/region etc.) I dragged into the matrix  columns section, the problem was same.  

2 ACCEPTED SOLUTIONS
Arentir
Resolver III
Resolver III

Hi @Anik ,

Your Date dimension relates to the delivery date key field in Fact table, and you do have records with blank delivery date in the fact table. This is why the dimdate field is empty, and power bi won't filter them out by default in case you need them!

 

If you want to avoid that, you could add a filter on the visual/page/report to exclude those cases.

 

image.png

 

 

View solution in original post

@Anik Try using Invoice Date Key instead to form your relationship. You have blanks in your Delivery Date Key.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

7 REPLIES 7
Arentir
Resolver III
Resolver III

Hi @Anik ,

Your Date dimension relates to the delivery date key field in Fact table, and you do have records with blank delivery date in the fact table. This is why the dimdate field is empty, and power bi won't filter them out by default in case you need them!

 

If you want to avoid that, you could add a filter on the visual/page/report to exclude those cases.

 

image.png

 

 

Anik
Helper I
Helper I

Capture.PNGCapture 2.PNG

Hi @Anonymous and @Greg_Deckler , the left image was taken from a book, the right one was done by me. I tried and inspected everything according to my knowledge. I am sure I cannot hammer on the right place due to my inexperienced eyes. I have attached the practice file. Could you please go it over and tell me what's the mistake I made so that I don't make the same mistake over and over again?  Thank you 😊  https://drive.google.com/file/d/1qFkzdEYZw3PffdZz3yngv5xluowB4TF5/view?usp=sharing     

@Anik Try using Invoice Date Key instead to form your relationship. You have blanks in your Delivery Date Key.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler , @Arentir , thank you so much 😊. Next time I am going to keep in mind about the blank cells while making relationships.  

Hi,

In the Delivery Date key column of the Fact sales table, there are some blank cells.  Plug them in with Dates.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Super User
Super User

@Anik There is likely something going wrong in a relationship between two tables. You tend to get blanks when rows don't match up. For example:

 

Year

2013

2014

2015

 

Fact

Year   Value

2012  2

2013  5

2014  6

2015  2

 

Assuming a relationship between the two tables on Year if you used Year from your Year table and a sum of Value from your other table you would get a blank row that is essentially the 2012 data.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

This is very basic, but have you checked the Calendar YEar column for those 55 entries to ensure they are formatted as date? (I assume yes, as I am assuming from your post that when no additional column is added in, the report correctly shows 12,760?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.