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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.