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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DAX_pbi_learner
Frequent Visitor

Is it possible for field parameters to have dynamic decimal places

DAX_pbi_learner_0-1733168531937.png

DAX_pbi_learner_1-1733168687192.png

I have created field parameters for 3 units. However, I want only the Million metric tons to show 4 to 5 decimal places and the other units to be whole numbers. Is there a way to fix this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @DAX_pbi_learner ,

I made simple samples and you can check the results below:

vtianyichmsft_0-1733188982569.png

vtianyichmsft_1-1733188998868.png

vtianyichmsft_2-1733189014670.png

Replace Value = var _s = SELECTEDVALUE('Parameter'[Parameter Order])
RETURN SWITCH(TRUE(),_s=0,ROUNDUP(MAX('Table'[Category1]),0),
_s=1,ROUNDUP(MAX('Table'[Category2]),0),
_s=2,MAX('Table'[Category3]))

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

3 REPLIES 3
DAX_pbi_learner
Frequent Visitor

hello, thank you for the solution...do you know how this would work with measures?

Anonymous
Not applicable

Hi @DAX_pbi_learner ,

 

Maybe I didn't understand your need, I created a measure for Value based on the parameter's serial number, isn't that what you want?

 

Best regards,
Community Support Team_ Scott Chang

Anonymous
Not applicable

Hi @DAX_pbi_learner ,

I made simple samples and you can check the results below:

vtianyichmsft_0-1733188982569.png

vtianyichmsft_1-1733188998868.png

vtianyichmsft_2-1733189014670.png

Replace Value = var _s = SELECTEDVALUE('Parameter'[Parameter Order])
RETURN SWITCH(TRUE(),_s=0,ROUNDUP(MAX('Table'[Category1]),0),
_s=1,ROUNDUP(MAX('Table'[Category2]),0),
_s=2,MAX('Table'[Category3]))

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.