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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
PBI-Curious
Resolver I
Resolver I

Dax error message - Special flag is not allowed as an argument number 3 function RANKX

PBI Community Good Day!

 

I'm trying to create a dax measure that ranks the top 10 products by revenue_amount_usd

 

Need to solve for the error message below.

 

Much appreciated your time.

 

Thank you

 

PBICurious_1-1696966654740.png

 

 

PBICurious_0-1696965885694.png

 

1 REPLY 1
DallasBaba
Super User
Super User

@PBI-Curious Let replace the VALUES function with SUMMARIZE to create a table that includes the 'product' column and the calculated 'TotalRevenue' column.

 

Top 10 Products by Revenue =
CONCATENATEX(
TOPN(
10,
SUMMARIZE(
'revenue_prelim_data',
'revenue_prelim_data'[product],
"TotalRevenue", CALCULATE(SUM('revenue_prelim_data'[revenue_amount_usd]))
),
[TotalRevenue], DESC
),
'revenue_prelim_data'[product],
",",
[TotalRevenue]
)

 

Please let me know if that works.

 

Thanks

Thanks
Dallas

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.