cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper IV

## How to convert a specific measure to decimal consist in another measure

Hello All,
Is it possible, to convert decimal places to 2 for specific measure. below is my dax:

DI_Value = SWITCH(TRUE(),
SELECTEDVALUE('Attribute'[Attribute])="OHI > 12 Months",IF([on Hand Inv(Greater than 12 month)]=BLANK(),0,[on Hand Inv(Greater than 12 month)]),
SELECTEDVALUE('Attribute'[Attribute])="In-Transit (docs recvd)",IF([nopendelStock measure]=BLANK(),0,[nopendelStock measure]),
SELECTEDVALUE('Attribute'[Attribute])="OHI (>12 Months + In-Transit)",IF([On Hand (Greater Than 12 m) + In-Transit (docs rec'd)]=BLANK(),0,[On Hand (Greater Than 12 m) + In-Transit (docs rec'd)]),
SELECTEDVALUE('Attribute'[Attribute])="Coverage-OH+InTransit/3 mnth frcst Avg",IF([Coverage -OH+In Tranit / 3mth Fcst Avg]=BLANK(),0,[Coverage -OH+In Tranit / 3mth Fcst Avg]),
SELECTEDVALUE(Attribute[Attribute])="Monhtly Forcst- Currnt Month",IF([Monthly Forecast (Current Month)]=BLANK(),0,[Monthly Forecast (Current Month)]),
SELECTEDVALUE(Attribute[Attribute])="MTD Orders (Date-1)",IF([MTD qty measure]=BLANK(),0,[MTD qty measure]),
SELECTEDVALUE(Attribute[Attribute])= "MTD Shippments (Date-1)",IF([MTD Sales measure]=BLANK(),0,[MTD Sales measure]),
SELECTEDVALUE(Attribute[Attribute])="BackOrder Qty Net Off Stocks",IF([Backorder Qty (net off stocks)]=BLANK(),0,[Backorder Qty (net off stocks)]),
SELECTEDVALUE(Attribute[Attribute])="Customer Backorder \$\$",IF([Customer Backorder \$\$]=BLANK(),0,[Customer Backorder \$\$]),
SELECTEDVALUE(Attribute[Attribute])="Monthly Forecast (3 mon Avg)",IF([Monthly Forecast (3 mo Average)]=BLANK(),0,[Monthly Forecast (3 mo Average)]),
SELECTEDVALUE(Attribute[Attribute])="Total Commits (Curr Mon)",IF([Total Commits (Current Month)]=BLANK(),0,[Total Commits (Current Month)]),
SELECTEDVALUE(Attribute[Attribute])="Total Commits M1",IF([Total Commits (M1)]=BLANK(),0,[Total Commits (M1)]),
SELECTEDVALUE(Attribute[Attribute])="Deliveries to Eversena (Curr Mon)",IF([Deliveries to Eversana (Current Month)]=BLANK(),0,[Deliveries to Eversana (Current Month)]),
SELECTEDVALUE(Attribute[Attribute])="Last 12 Month Average Shipment",IF([Last 12 month average shipment]=BLANK(),0,[Last 12 month average shipment]),
SELECTEDVALUE(Attribute[Attribute])="Last 12 Month Average Order",IF([Last 12 month average order]=BLANK(),0,[Last 12 month average order]),
SELECTEDVALUE(Attribute[Attribute])="FI Stock ( Not in BSR)",IF([nopenFIStock measure]=BLANK(),0,[nopenFIStock measure]))

where above measure's decimal places is 0, and if convert it to 2 then it will convert it for all measures it have in dax.
but i want to convert decimal place for specific measure only, highlighted with Bold.

below is the graph i created using above measure.

where client only want decimal for bar 'Coverage-mnth frcst Average'.

5 REPLIES 5
Helper V

Hi @jay_patel

Use format dax for that sepcific Bar

Helper IV

Yes I did the same, still not visible

Helper V

Hi @jay_patel

Can you share the PBIX file after avoiding sensitive data

Super User

Format your Measure explicity by using the Format function. Please see the code below. You can remove the decimal values if you need a whole number.

``DI_Value = Format([Your BoldMeasure],"0.00")``

Helper IV

HI @miTutorials

Now the bar is not visible for bold measure.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

#### Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors