Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a table with following numeric values:
A | B | C | |||
WN | 112.00 | 256.00 | 198.00 | ||
TD | 3.96 | 5.634615 | 4.506757 | ||
OD | 4.00 | 5.530435 | 4.320175 |
How to get the following results?
A | B | C | |||
WN | 112 | 256 | 198 | ||
TD | 3.96 | 5.63 | 4.51 | ||
OD | 4.0 | 5.5 | 4.3 |
The values need to be row WN =Whole Number, TD = Two Decimals, OD = One Decimal Value.
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
I suggest unpivotting the table like below, and write the measure like below.
Result: =
SWITCH (
SELECTEDVALUE ( Data[Category] ),
"WN", FORMAT ( SUM ( Data[Value] ), "#,##0" ),
"TD", FORMAT ( SUM ( Data[Value] ), "#,##0.00" ),
"OD", FORMAT ( SUM ( Data[Value] ), "#,##0.0" )
)
Hi,
Please check the below picture and the attached pbix file.
I suggest unpivotting the table like below, and write the measure like below.
Result: =
SWITCH (
SELECTEDVALUE ( Data[Category] ),
"WN", FORMAT ( SUM ( Data[Value] ), "#,##0" ),
"TD", FORMAT ( SUM ( Data[Value] ), "#,##0.00" ),
"OD", FORMAT ( SUM ( Data[Value] ), "#,##0.0" )
)
Thank you Jihwan_Kim!
@dandreev , You have to create a new column or measure for each one
example
A= Switch(True() ,
[Column 1] = "WN", round([A],0) ,
[Column 1] = "TD", round([A],2) ,
[Column 1] = "OD", round([A],1)
)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
60 | |
58 | |
56 | |
38 | |
28 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |