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
Thakshila
Frequent Visitor

issue when getting the nth value with DAX query for sub categories


I'm trying to get the nth value using below dataset. I could get the nth value for the correct category. When I added the sub category. It gives the wrong result for the sub categories. It takes the nth value for the sub categories as well. how to avoid this and get the correct result for the sub categories as well. I have attached my .PBI file and pictures of my dax query and results as well.
(https://1drv.ms/u/s!AtRjTEx4ATvZykgX9eSCVl0xBFXa?e=Fz2ctR )
Any help would be appriciated. 
Please check the below screen shot. 


Dax Query
pbi2.PNG

 

Results    

PBI1.PNG

 

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

1 REPLY 1
wdx223_Daniel
Super User
Super User

wdx223_Daniel_0-1616662220051.png

 

Helpful resources

Announcements
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.

June 2025 community update carousel

Fabric Community Update - June 2025

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