Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

cell level calculations different data type custom table tile & its contents

Hello Power BI team and experts, Power BI desktop or Power BI report builder is it possible to create a table visual tile which contacins each cell level calcualtions and with different data types ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous 

    From your example1, the value column should be Number and % column should be number percent.

    Every column has only one type , so we can't make the values in the same column have different types.

    I build a sample table to have a test.

    Build a calculated column(Value %) like example1.

    Value % =
    VAR _Offered_calls =
        CALCULATE (
            SUM ( 'Table'[Value1] ),
            FILTER ( 'Table', 'Table'[Item] = "Offered calls" )
        )
    VAR _Abandoned =
        CALCULATE ( SUM ( 'Table'[Value1] ), 'Table'[Item] = "Abandoned" )
    VAR _Answer =
        CALCULATE ( SUM ( 'Table'[Value1] ), 'Table'[Item] = "Answer" )
    VAR _percent =
        SWITCH (
            'Table'[Item],
            "Abandoned",
                FORMAT ( _Abandoned / _Offered_calls * 100, 0 ),
            "Answer",
                FORMAT ( _Answer / _Offered_calls * 100, 0 ),
            "Offered calls",
                FORMAT ( _Offered_calls / _Offered_calls * 100, 0 ),
            "-"
        )
    RETURN
        'Table'[Value1] & " " & _percent

    Result:

    Due to one column will have only one type, the Value% column will change the type as Text.

    You can download the pbix file from this link: cell level calculations different data type custom table tile & its contents

     

    Best Regards,

    Rico Zhou

     

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