Forum Discussion

BrendonHerbert's avatar
BrendonHerbert
Regular Visitor
6 years ago
Solved

Help with Card Data Type Formats

Hi all,

 

I am working on something that is a little fun but I have reached a point where I am a little "flummoxed".

 

It is essentially a simple report based on 4Dx which allows users to define a bunch of variables in excel and then I can ingest it into Power BI and create a canned visual style report.  I am using this as an opportunity to play with Power BI so there are probably lots of things wrong here.  However....

 

I have an excel spreadsheet containing some parameters and values (see below)

 

 

I then import into Power BI

 

 

From here I have a Power BI Report page extracting the data using measures (mainly).

 

Sample measure and report page below.

 

 

 

The problem I have is that I cannot for the life of me figure out how to format the KPI target into a standard number. 

 

I have tried modifying the field format but because there are combinations of text and numeric values they all seem greyed out.

 

I am assuming I have done something silly but any help would be greatly appreciated. 

 

regards

 

Brendon

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi BrendonHerbert ,

     

    FORMAT operates on numeric values. So FORMAT(<value> ,"Standard")  will display the value with thousand separators only if the value is of type numeric.  In your case all the values are of type text, although the content is numeric. So this approach will not work.

     

    You could change the measure as follows

     

    var Parameter = "KPI target"

    var Stage1 = LOOKUPVALUE( Your original expression)

    var Stage2 = CONVERT (Stage1, DOUBLE)

    return

    FORMAT(Stage2, "Standard")

     

    Check it out and let me know.

     

    Cheers

     

    CheenuSing

     

     

     

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi BrendonHerbert ,

     

    FORMAT operates on numeric values. So FORMAT(<value> ,"Standard")  will display the value with thousand separators only if the value is of type numeric.  In your case all the values are of type text, although the content is numeric. So this approach will not work.

     

    You could change the measure as follows

     

    var Parameter = "KPI target"

    var Stage1 = LOOKUPVALUE( Your original expression)

    var Stage2 = CONVERT (Stage1, DOUBLE)

    return

    FORMAT(Stage2, "Standard")

     

    Check it out and let me know.

     

    Cheers

     

    CheenuSing

     

     

     

    • BrendonHerbert's avatar
      BrendonHerbert
      Regular Visitor

      Hi Anonymous  and cjayaneththi ,

       

      thank you both for your responses.  

       

      Anonymous your approach worked perfectly!!

       

      thank you very much

       

  • Hi,

     

    You can create separate table for numeric  values when you query this table.

     

    Cheers