Forum Discussion

o59393's avatar
o59393
Post Prodigy
6 years ago
Solved

Calculated column duplicating values when drilling down

Hi all   I am trying to get the breakdown of a total calculated column when I drill down by the type of a certain product and country.   The concept is the following with an example:   I have a...
  • d_gosbell's avatar
    d_gosbell
    6 years ago

    I don't think I'd try concatenating the dates in. I'm assuming that Type is a further breakdown of a product. So I would create a table with a distinct list of country, product and type and link that to Query1. Because you don't appear to have any surrogate keys I think the only way to do this is by concatenating the 3 columns. 

     

    See the attached file for one possible approach

  • v-lid-msft's avatar
    v-lid-msft
    6 years ago

    Hi o59393 ,

     

    We can try to use the following measure to meet your requirement:

     

    Part 3 value_2 = 
    SUMX(GROUPBY('Parts2','Parts2'[Beverage Product],'Parts2'[Type]),CALCULATE(MAX('Parts'[Value]),FILTER('Parts','Parts'[Attribute] = "Part 3" && 'Parts'[Type] ='Parts2'[Type])))

     


    Best regards,