Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Summarize and Ranking

Hi All,

I am trying to write a dax to rank the Top3 Model based on there Trust Value.

Here the Trust is Avg Value By Model across all Cluster so i get duplicate rows and hence i thought i will use Summarize to Group the Table by Cluster, Model and Trust and pick top3. I get an error though using the below dax 
"Multiple column Cannot be convereted to scalar value"

 

ModelClusterAvgtrustByModel
ArimaA50

Arima

B50
ArimaC50
EtsA40
EtsB40
EtsC40
ProphetA60
ProphetB60
ProphetC60

 

 

 

TOP3Model1 = 
FILTER(SUMMARIZECOLUMNS('Submission KPIs'[Cluster_long], 'Submission KPIs'[Model_Name], "AvgRankByModel", AVERAGE('Submission KPIs'[Trust] )),
CONCATENATEX(
        TOPN(
            3
            ,'Submission KPIs'
            ,[AvgRankByModel]
            ,DESC
        )
        ,'Submission KPIs'[Model_Name]&"("&FORMAT([AvgRankByModel],"##%")&")"
        ,", "
        ,[AvgRankByModel]
    ))

 

 

 

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Greg_Deckler
Community Champion
Community Champion

@Anonymous That code is returning a table and measures have to return scalar values. Try this:

TOP3Model1 = 
  VAR __Table = SUMMARIZECOLUMNS('Submission KPIs'[Cluster_long], 'Submission KPIs'[Model_Name], "AvgRankByModel", AVERAGE('Submission KPIs'[Trust] )
RETURN
CONCATENATEX(
        TOPN(
            3
            ,__Table
            ,[AvgRankByModel]
            ,DESC
        )
        ,'Submission KPIs'[Model_Name]&"("&FORMAT([AvgRankByModel],"##%")&")"
        ,", "
        ,[AvgRankByModel]
    ))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks @Greg_Deckler , i made a change to it and it worked. Can you also help me how can i reverse the order of the result. Current Ouptut is ETS(40%) ,Arima(50%), Prophet(60%), i think its because of the FORMAT String. How can i make it output display as  Prophet(60%), Arima(50%), ETS(40%)? 

Anonymous
Not applicable

Hi @Anonymous,

Perhaps you can try to modify the sort parameter DESC to ASC if it help with your requirement.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors