Forum Discussion

Machiyara1's avatar
Machiyara1
New Member
2 years ago
Solved

Table Total show incorrect value than the visual total

I have 3 Tables
1. List of Items: which has all the names of Products
2. Sales: it has datewise sales at different rates depending on the customer, our Selling rates are not fixed.
3. Purchases: We purchase Products in bulk from time to time at different rates.


I have attached tables structure

I have created a relation as follows
Sales(many) to List(1)
List(1) to Purchase(Many)

this is my Power Bi Table 
its total according to the visual values should be 219000+ but it's coming to 214293
what is the issue
I tried trying many things
please guide me 
thnx

  • Thanx every one for your reply and solutions
    I have solved it myself
    thnx 

5 Replies

  • Thanx every one for your reply and solutions
    I have solved it myself
    thnx 

  • Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

    Do not include sensitive information or anything not related to the issue or question.

    If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216

    Please show the expected outcome based on the sample data you provided.

    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

    • Machiyara1's avatar
      Machiyara1
      New Member

      THNX FOR UR SUPPORT 
      i HAVE SOLVED IT MYSELF

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Machiyara1 ,

     

    May I ask if the incorrect totals you are referring to are the incorrect totals for the Total rows that are placed on the form visual?

     

    Measure follows the context of the "Total" row and is calculated in that context. Therefore, using a measure in a column of a table visualization may have unexpected values in the "Total" column.

     

    You can use the following measure, using the IF()+HASONEVALUE() function, to determine if it is Total, and if it is, you can calculate it according to your own needs, such as Average, Sum, etc.

    You can try using the following measure.

    Measure =
    var _table=SUMMARIZE('Table','Table'[Items],"Value",[CODS X])
    return
    IF(
        HASONEVALUE('Table'[Items]),[CODS X],SUMX(_table,[Value]))

     

     

    Best Regards,

    Liu Yang

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

    • Machiyara1's avatar
      Machiyara1
      New Member

      THNX FOR YOUR SUPPORT AND REPLY
      i SOLVED IT MYSELF
      THNX