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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Saniat
Helper V
Helper V

How to know the number of values in Y axis

Hi,

I am using Field Parameter to let user choose the breakdown option / dimension: e.g. function, Job Level, Perm/Temp in below example.

Saniat_1-1675345515694.png

 

 

Is it possible to know how many items/values are present in the Y axis ?

Example:

 

Saniat_2-1675345740693.png



Saniat_3-1675345764014.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Saniat , get selected patameter

Selected Parameter = maxx(filter(Parameter ,Parameter[Parameter Order] = SELECTEDVALUE(Parameter[Parameter Order])), Parameter[Parameter])

 

Then have meausre like

Switch([Selected Parameter],

"Function", countx(Values(Table[Function]), [measure]),

"Job Level", countx(Values(Table[Job Level]), [measure]),

"Perm/Temp", countx(Values(Table[Perm/Temp]), [measure])

)

 

 

refer

Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

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

View solution in original post

3 REPLIES 3
v-jianboli-msft
Community Support
Community Support

Hi @Saniat ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

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

amitchandak
Super User
Super User

@Saniat , get selected patameter

Selected Parameter = maxx(filter(Parameter ,Parameter[Parameter Order] = SELECTEDVALUE(Parameter[Parameter Order])), Parameter[Parameter])

 

Then have meausre like

Switch([Selected Parameter],

"Function", countx(Values(Table[Function]), [measure]),

"Job Level", countx(Values(Table[Job Level]), [measure]),

"Perm/Temp", countx(Values(Table[Perm/Temp]), [measure])

)

 

 

refer

Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

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

Thanks !

With slight modification it worked:

Selected Breakdown Count =

Switch([Selected Breakdown],

"Function", DISTINCTCOUNT([Function]),

"Job Level", DISTINCTCOUNT('1'[Job Level]),

"Perm/Temp", DISTINCTCOUNT('1'[Perm/Temp])

)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors