Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bmannato
Frequent Visitor

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

2 ACCEPTED SOLUTIONS

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?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

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")

)

View solution in original post

5 REPLIES 5
Phil_Seamark
Employee
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.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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

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?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Yes, I've created some simple measures (e.g sum of all purchases, regardless of any filter), and some tables with single filtering, using functions like SUM, CALCULATE, and SUMMARIZE. 

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")

)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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