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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Pavithran23
New Member

Dax Measure is not working

I need a help with dax measure 

doubt.PNGranking.PNG

Issue

Hi mam/sir currently working on oynx data project having one issue cant able to find the problem can you kindly look into it on your free time it would be really helpful - problem - trying to filter the table rows based on selected filter value for top and bottom its working but if i select another visual bottom ranking is not working for top its working fine. Attaching the images below. Thanking you in advance

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @Pavithran23 

You can try the following solution.

1.Replace the ALL() function to ALLSELECTED() function in the measure.

2.Add calculate() funciton in the dax.

e.g 

Ranking = 
var _top=RANKX(ALL('Insurance Plicies'[ID]),CALCULATE([Total Claim Account]),,DESC)
var _bottom=RANKX(ALL('Insurance Plicies'[ID]),CALCULATE([Total Claim Account]),,ASC)
return IF([SelectedRankType]"Bottom",_bottom,_top)

If the information above cannot meet your requirements, can you offer some sample data or file so that can provide more suggestion for you.

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @Pavithran23 

You can try the following solution.

1.Replace the ALL() function to ALLSELECTED() function in the measure.

2.Add calculate() funciton in the dax.

e.g 

Ranking = 
var _top=RANKX(ALL('Insurance Plicies'[ID]),CALCULATE([Total Claim Account]),,DESC)
var _bottom=RANKX(ALL('Insurance Plicies'[ID]),CALCULATE([Total Claim Account]),,ASC)
return IF([SelectedRankType]"Bottom",_bottom,_top)

If the information above cannot meet your requirements, can you offer some sample data or file so that can provide more suggestion for you.

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.