Forum Discussion

cewjr9842's avatar
cewjr9842
Frequent Visitor
6 years ago
Solved

Issues merging values and columns in PBI

Good Day People!   First let me state my premise. I am currently building a report as well as this is my first time using PBI to manipulate data and its a pretty cool tool. When i say first time us...
  • Icey's avatar
    6 years ago

    Hi cewjr9842 ,

    For the chart, you can create it like so:

     

    For the Matrix, you can create it like so:

    1. Enter a table "Range" and sort "Range" column by column "Index".

    2. Create a measure.

    Sum of n = 
    SWITCH (
        TRUE (),
        SELECTEDVALUE ( Range[Range] ) = "Missing", CALCULATE ( 
            SUM ( 'Table'[n] ), 
            'Table'[time_bucket] = -1 
        ),
        SELECTEDVALUE ( Range[Range] ) = "<30", CALCULATE ( 
            SUM ( 'Table'[n] ), 
            'Table'[time_bucket] <= 30 
        ),
        SELECTEDVALUE ( Range[Range] ) = "30-60", CALCULATE (
            SUM ( 'Table'[n] ),
            'Table'[time_bucket] > 30
                && 'Table'[time_bucket] <= 60
        ),
        SELECTEDVALUE ( Range[Range] ) = "1-2 min", CALCULATE (
            SUM ( 'Table'[n] ),
            'Table'[time_bucket] > 60
                && 'Table'[time_bucket] <= 120
        ),
        SELECTEDVALUE ( Range[Range] ) = ">2 min", CALCULATE (
            SUM ( 'Table'[n] ),
            'Table'[time_bucket] > 120
                && 'Table'[time_bucket] <= 2400
        ),
        SELECTEDVALUE ( Range[Range] ) = ">20 min", CALCULATE ( 
            SUM ( 'Table'[n] ), 
            'Table'[time_bucket] > 2400 
        ),
        SELECTEDVALUE ( Range[Range] ) = BLANK (), 
        SUM ( 'Table'[n] )
    )

    3. Create the Matrix.

     

    Best Regards,

    Icey

     

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