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
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
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.