Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
3 years ago
Solved

Line graph with grouped data

Hello I appreciate that you can guide me with the following


I am trying to make a graph of lines in which I show myself in independent lines by dates the regions that have sold more than 50 million and those that are below that budget show them
grouped in a single line with the name "Other Regions"

The data table a region can be repeated a number of times and the sum of that region must be greater than 50 million to be graphed, if the sum of a certain region gives less than 50 million it must be grouped with the other regions that do not exceed the barrier of 50 million.

According to the data table I must show in the graph of lines, the independent regions 1 and 5 and the others grouped in a single line.

Thank you.

  • Hi Syndicate_Admin ,

     

    Please try:

    First create a nwe column:

     

    New Region = 
    var _a = CALCULATE(SUM('Table'[VALOR]),FILTER('Table',[REGION]=EARLIER('Table'[REGION])))
    return IF(_a>50000000,[REGION],"Other Regions")

     

    Output:

    Then create the line chart:

    Final output:

     

    Best Regards,

    Jianbo Li

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

1 Reply

  • Hi Syndicate_Admin ,

     

    Please try:

    First create a nwe column:

     

    New Region = 
    var _a = CALCULATE(SUM('Table'[VALOR]),FILTER('Table',[REGION]=EARLIER('Table'[REGION])))
    return IF(_a>50000000,[REGION],"Other Regions")

     

    Output:

    Then create the line chart:

    Final output:

     

    Best Regards,

    Jianbo Li

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