Forum Discussion

dal2klc's avatar
dal2klc
New Member
3 years ago
Solved

DAX Function - FORMAT( x, "Standard") need "Whole"

I am utilizing a Matrix visual to provide my main stats in a vertical format. Each stat has a value and a % to Total.

- Each stat is associated to a device.(Top Row)

- Each stat is an inidividual DAX formula. (Left hand side)

I have not figured out a way to insert both. I ended up with a formula to mimic this, but I lose formating of the value. I have tried FORMAT(x, "Standard") but it pushes it to a Decimal and I need Whole.

Formula -

[- Metric#] = FORMAT([Bad Label], "Standard") & " / " & ROUND(([Bad Label] / [Scan Volume])*100,2) & "%"))
Comes out to - 1,246.00 / 2.01% --> Need 1,246 / 2.01%
Pic is original, no format attempts. [Bag Label] is formatted Whole with comma, but does not translate over to

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi dal2klc ,

    Please try below dax formula:

    [- Metric#] = MID(FORMAT([Bad Label], "Standard"),1,LEN(FORMAT([Bad Label], "Standard"))-3) & " / " & ROUND(([Bad Label] / [Scan Volume])*100,2) & "%"))

     Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi dal2klc ,

    Please try below dax formula:

    [- Metric#] = MID(FORMAT([Bad Label], "Standard"),1,LEN(FORMAT([Bad Label], "Standard"))-3) & " / " & ROUND(([Bad Label] / [Scan Volume])*100,2) & "%"))

     Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • dal2klc's avatar
      dal2klc
      New Member

      Thank you for your assistance, I should have thought about LEN, I appreciate your help!

  • PowerBI_Scott's avatar
    PowerBI_Scott
    Frequent Visitor

    Would using the format #,### as shown below work better?  If so, it would be easier to read/modify later.
    [- Metric#] = FORMAT([Bad Label], "#,###") & " / " & ROUND(([Bad Label] / [Scan Volume])*100,2) & "%"))