Forum Discussion

xiumi_hou's avatar
xiumi_hou
Post Partisan
6 years ago
Solved

Quick question for measure format data

Dear all,

 

I have below switch measure:

Current Month_Session = SWITCH(
                            MIN('Measure Filter - Session'[Number]) ,
                            --------------------------------------
                            1,[Count_Sessions_Scheduled],
                            8,[Scheduled_without_cancelled_24hrs],
                            2,[Count_Held_Sessions],
                            3,[Count_A1_Assessment_Held],
                            6,[Count_Sessions_Cancel/Missing],
                            9,[Count_Sessions_Cancel_outside 24],
                              10,[Count_Percentage_Missing/Cancelled]
                            )
 
I need to put this switch measure into one card/graph. However, the red one number is a percentage. If I put this switch measure data format as general, the percentage show 0.38 instaed of 38%. Anyone know how should I let 10 show percentage? Thank you 
  • parry2k's avatar
    parry2k
    6 years ago

    xiumi_hou If you want this as a number, you cannot have mixed format for the same measure. You have to create seperate measure for each format option you want. 

6 Replies

    • xiumi_hou's avatar
      xiumi_hou
      Post Partisan

      parry2k  Hi Parry, 

       

                      The red one is a measure, and I put the format as percentage. However, when I put all the calculate measures as a new a measure(Current Month_Session), because the other calculate measures in the switch measure is integar, so I have to put the switch measure format as general, How should I make 10(red) as percentage? 

      • parry2k's avatar
        parry2k
        Super User

        xiumi_hou something like this and this post will help

         

         

        Current Month_Session =
        VAR __myValue =  SWITCH(
                                    MIN('Measure Filter - Session'[Number]) ,
                                    --------------------------------------
                                    1,[Count_Sessions_Scheduled],
                                    8,[Scheduled_without_cancelled_24hrs],
                                    2,[Count_Held_Sessions],
                                    3,[Count_A1_Assessment_Held],
                                    6,[Count_Sessions_Cancel/Missing],
                                    9,[Count_Sessions_Cancel_outside 24],
                                      10,[Count_Percentage_Missing/Cancelled]
                                    )
         RETURN
        IF ( 
        MIN('Measure Filter - Session'[Number]) = 10, 
        FORMAT( __myValue, "Percent"),
        FORMAT( __myValue, "General Number")
        )