Forum Discussion

CadenChow's avatar
CadenChow
Frequent Visitor
5 years ago
Solved

How can I create summary table with strange requirement?

Hi all,   I am new joiner of this forum nice to meet you😃   I am creating power BI dashboard but I have no clue of how to create the summary table with information below:   Full list of RAG st...
  • v-henryk-mstf's avatar
    5 years ago

    Hi CadenChow ,

     

    According to your needs, I did the following test. First, I created a measure to count the RAG value corresponding to the maximum value in the Item field under the Group grouping. Then create a virtual table, get the correct result, refer to the following: 

    M = 
    VAR _maxitem =
        CALCULATE ( MAX ( 'Table'[Item] ), ALLEXCEPT ( 'Table', 'Table'[Group] ) )
    RETURN
        CALCULATE (
            MAX ( 'Table'[RAG] ),
            FILTER (
                ALLSELECTED ( 'Table' ),
                'Table'[Group] = SELECTEDVALUE ( 'Table'[Group] )
                    && 'Table'[Item] = _maxitem
            )
        )
    Result_ = SUMMARIZE('Table','Table'[Group],"RAG",[M])


    If the problem is still not resolved, please provide detailed error information. Let me know immediately, looking forward to your reply.

     

    Here is the sample pbix file.

    Best Regards,
    Henry

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