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
rolyzo
Helper I
Helper I

Dynamically display decimal

I have the next column:

tblDesviacionMovil[NDecimal]

This column tells me that the parameter must show its value with N Decimal

for example:

Parameter                NDecimal

Parameter1              1

Parameter2              0

Parameter3              2

 

and I have another measure column

 

Real = SWITCH(MAX(tblDesviacionMovil[TipoCalculo]),
3, sumx(tblDesviacionMovil, (tblDesviacionMovil[RealOrigen] * tblDesviacionMovil[ProductoCartesiano2]) / sum(tblDesviacionMovil[ProductoCartesiano2])),
1, SUM(tblDesviacionMovil[RealOrigen]),
2, AVERAGE(tblDesviacionMovil[RealOrigen]) )

 

Now, I want to display this measue column (Real) in Table visual with the following form.

Parameter                Real

Parameter1              120.1

Parameter2                 321

Parameter3              235.85

 

I need to do this

Thanks for you help.

1 ACCEPTED SOLUTION

I use a formula and then the FORMAT function.

Thanks for everything.

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Hmm, I'm not aware of a way to do that. You set the number of decimal places to show for a measure once per measure. Perhaps you could take the output of your formua and convert it to a string and then parse it to only the number of decimal places that you want?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

I use a formula and then the FORMAT function.

Thanks for everything.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.