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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
Skilled Sharer
Skilled Sharer

@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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.