Forum Discussion

Fistachpl's avatar
Fistachpl
Helper III
4 months ago
Solved

Incorrect turnover total

In this topic: Re: Number of Core Products sold through assemblie... - Microsoft Fabric Community we discussed the calculation of amount of products sold through an assemblies. Thanks to FBergamaschi , who solved the issue of calculating the products, and not to mix too many problems in one thread, I create this topic, as right now there is the problem of incorrect calculations of the turnover made by sales through assemblies. 

The correct sum is: 

I would be happy not just to receive the solution but also to know how to check this. 

 

Thanks in advance!

  • FBergamaschi's avatar
    FBergamaschi
    4 months ago

    Got it sooner than expected

     

    Attached the v4 version with this result

     

     

     

    Started from your v3 (previous post) and changed only the DAX

     

    We could discuss the relationship Basuc price - dim Product, but I did not change that this time

     

    _to2 =
    SUMX (
        VALUES ( 'dim Products and Assemblies'[Catalogue No]),
        CALCULATE(
            ([Test Sold Direct]+[Test])*[_price]
        )
    )
     
     

     

6 Replies

  • Hi Fistachpl 

    the problem was due to the the relationship set

     

    The situazion was that you had a many to one relationship between Basic product pricelist and dim Product and Assembly. I changed it into a one to many (it is in reality a 1 to 1 but as you have done, you can force that to many to one or one to many, I just forced it on the opposite direction so Basic product pricelist becomes a dimension)

     

    Now I get this

     

     

    File attached

     

    In this way, the _price measure becomes:

     

     

    • Fistachpl's avatar
      Fistachpl
      Helper III

      FBergamaschi but the problem is, that values in green are correct, just the SUM is not:

      the turnover should be calculated on the base of direct sales + sales through assemblies not as in this case where we have: direct sales + assembly sales (orange rectangle):

      These values 137,50, 168 and 216 should be "distributed" over the basic products. 

       

       

       

  • v-abhinavmu's avatar
    v-abhinavmu
    Community Support

    Hi Fistachpl,

    Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to FBergamaschi  for sharing valuable insights.

     

    Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.

     

    Thank you for being part of the Microsoft Fabric Community.

  • v-abhinavmu's avatar
    v-abhinavmu
    Community Support

    Hi Fistachpl,

    May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.

    Thank you for being part of the Microsoft Fabric Community.