Forum Discussion

Baudi's avatar
Baudi
New Member
1 year ago
Solved

Issue with Grouping in Power BI

Hello everyone, I’m still relatively new to Power BI and currently facing a conceptual issue. I’m working with two tables: Orders and CLE. The Orders table contains a week number field, which ...
  • Ashish_Mathur's avatar
    1 year ago

    Hi,

    Try this approach

    1. Create a Calendar Table with calculated column formulas for Year, Month name, Month number and Week number.  Sort the Month name by the Month number
    2. Create a relationship (Many to One and Single) from the Date column of the 2 Fact tables to this Calendar table
    3. To your visual, drag Year and Week number from the Calendar table
    4. Write this measure

    Measure = sum('cle'[Quantity])

    Hope this helps.

  • Anonymous's avatar
    Anonymous
    1 year ago

    Thanks for the reply from Ashish_Mathur  and samratpbi , please allow me to add some more information:
    Hi  Baudi ,

    You can join [Posting Date] and [Product Date] as a join relationship between two tables

    This way whether you use the table CLE's [Quantity] directly or create a measure with the following content, it will display properly:

    Measure =
    SUMX('CLE',[Quantity])

    Note: You need to click on visual to set the blank rows to be filtered from the side filters, because data that is not connected to the two tables will be aggregated in the blank rows.

     

     

    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