Forum Discussion

bmannato's avatar
bmannato
Frequent Visitor
9 years ago
Solved

Convert a card into a measure

I created a Card (hence, a Visual), by applying some filters into a column from my dataset. Is there an easy way to convert the resulting number into a measure? I'm not that familiar with DAX expressions, and would be much easier for me to create measures based on visuals than DAX expressions

  • Hi bmannato

     

    There is no feature to auto-create a measure from a card like that. You have created any measures at all so far?

  • I managed to create the measure independently from the visual, by using the example shown here
    Something like

    CALCULATE(SUM(Orders[total]);

          FILTER(Orders;Orders[LastMonth]="LastMonth");

          FILTER(Orders;Orders[status]="pent" ||

          Orders[status]="pe" ||

          Orders[status]="le" ||

          Orders[status]="ps" ||

          Orders[status]="pp")

    )

5 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi bmannato

     

    Probably.  Can you please describe the number you are using on your card.  Eg, it is the SUM of a particular field.

    • bmannato's avatar
      bmannato
      Frequent Visitor

      The number is the sum of all sales of my ecommerce, filtered (at visual level) by a column that says wether it's the current month, and by the column that says the status of each purchase (in this case, I'm filtering only confirmed payments, preparing for shipment, sent, and delivered orders, excluding cancelled, expired, and frauds). I don't know how to apply so many filters at once using DAX expressions, that's why I wondered if it was possible to create a measure base on the value of the card.

       

      Thanks in advance

      • Phil_Seamark's avatar
        Phil_Seamark
        Icon for Microsoft Employee rankMicrosoft Employee

        Hi bmannato

         

        There is no feature to auto-create a measure from a card like that. You have created any measures at all so far?