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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

AAS tabular model ,power bi measure doubling the values coming from Sql server.

Hi All,

 

I am facing a unique issue.. i have pulled a table from sql server into tabular model.this includes a amount column as well.but when i use this amount column in power BI with Sum as projection ,amount gets doubled.. when i use dont sum in projection the amount shows correct value..what could be the reason .. in order to replicate the issue pls find the dummy data.

 

detail data from Sql server
Amountcodeyear month
1001000201903
2001000201903
3001000201903
1002000201903
2002000201903
4002000201903

agg.JPG

 

 

In power BI,its showing 
Amount(sum)codeYear month 
12001000201903
14002000201903
   
In Power BI it should show  
Amount(sum)codeYear 
month 
6001000201903
7002000201903

 

Any suggestion or help is appreciated !

Thanks

Shash

2 ACCEPTED SOLUTIONS
v-cherch-msft
Employee
Employee

Hi @Anonymous 

Please check the table in data view.if they are distinct rows,it would not double the values.For example:

a1.png

If the table is like below,please try to use below measure or remove duplicates in query editor.

Measure = SUMX(DISTINCT('Table'),'Table'[Amount])

a1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Thanks Cherie Chen it was of great help ! ..it worked!! thanks alot!

View solution in original post

3 REPLIES 3
v-cherch-msft
Employee
Employee

Hi @Anonymous 

Please check the table in data view.if they are distinct rows,it would not double the values.For example:

a1.png

If the table is like below,please try to use below measure or remove duplicates in query editor.

Measure = SUMX(DISTINCT('Table'),'Table'[Amount])

a1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks Cherie Chen it was of great help ! ..it worked!! thanks alot!

Hi @Anonymous 

Glad to hear the reply is helpful, please accept my reply as solution, that way, other community members will easily find the solution when they get same issue.

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.