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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

RankX with Filter

Hi,
I was trying to build a RankX Forumla.
My Condtions are a Fact Table (Value,Date,ID,Company) and a Date Table (Date).
The Goal was a Ranking for the IDs for each company for each year for the values.
Is this possible?

Thought kinda like this...

=RANKX(_data_vo;
	CALCULATE(
		SUMX(_data_vo;[Wert]);
		FILTER(_data_vo;[company]=[company]);
		FILTER(_data_vo;[company_id]=[id]);
		FILTER(_data_vo;YEAR([Datum])=YEAR([Datum])));
	0;ASC;Dense)

 

Greetings

Sam

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Try like

 

RANKX(filter(allselected(_data_vo);_data_vo;[company]=max([company]) && [company_id]=[id] && YEAR([Datum])=YEAR(max([Datum])))
CALCULATE(
SUMX(_data_vo;[Wert]));
0;ASC;Dense)

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

I was trying to made it like that

but i get a ring addiction...(i dropped out the max, but get the same message with max in formula)

 

 

 

=RANKX(
	FILTER(
		ALLSELECTED(_data_vo);
			[company]=[company]&&[company_id]=[company_id]&&YEAR([Datum])=YEAR([Datum]));
		CALCULATE(
			SUMX(_data_vo;[Wert]));
	0;ASC;Dense)

 

 

 

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.