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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Gumberculeez
Helper II
Helper II

Divide a card output?

Hey All;

 

I'm looking to create a DSI gauge for our company.  I'm few direct queries to get the number for the equation (3 month coGS, and inventory values), but I need to do some simple math with them....

 

question is how 🙂

 

I need to take my card value for CoGS and divide by 90.  but it's a direct query measure that got me there.  

 

Same with the inventory value.  I'm going to need simple math with that as well.

 

Can I do this?

1 ACCEPTED SOLUTION

Hi @Gumberculeez ,

 

Well, then you need to create a new measure based on your measure in the card and these filters in the card too.

For example, below card has a measure and a filter applied.

vstephenmsft_0-1679303867907.png

Create a new measure based on them.

Measure 2 = CALCULATE([Measure],FILTER('Table',[Index] in {1,2,3,4,5,6}))

vstephenmsft_1-1679303977316.png

Of course, in order to cope with more complex cases, it may be necessary to add the ALL function or the ALLSELECTED function.

 

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

View solution in original post

3 REPLIES 3
Gumberculeez
Helper II
Helper II

On the surface that works... :).  However, my configuration is a bit more complex than that. Here's what I have:

 

Daily Sales Inventory:

 

1. Card that has the last 3 months of cost of goods sold.  this is from a table, includes 2 columns and a number of "accounts" from one column

2. Card that has a measure showing our sellable inventory.

 

The wall I'm hitting is I need to divide that Cost of Goods sold card by 90.  It seems I need a measure that will do everything the card does, than divides by 90. lol  Screenshot 2023-03-13 140837.png

Hi @Gumberculeez ,

 

Well, then you need to create a new measure based on your measure in the card and these filters in the card too.

For example, below card has a measure and a filter applied.

vstephenmsft_0-1679303867907.png

Create a new measure based on them.

Measure 2 = CALCULATE([Measure],FILTER('Table',[Index] in {1,2,3,4,5,6}))

vstephenmsft_1-1679303977316.png

Of course, in order to cope with more complex cases, it may be necessary to add the ALL function or the ALLSELECTED function.

 

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

v-stephen-msft
Community Support
Community Support

Hi @Gumberculeez ,

 

DIVIDE function is available in DirectQuery. If you want to divide the value in the card visual by 90, you can create a new measure like this:

 

New Measure = DIVIDE([Field in card visual], 90)

 

If the field in your card visual is a measure, refer directly, and if it is a column, reference it with the SUM function, MAX function, or MIN function.

 

New Measure = DIVIDE(SUM('TABLE'[COLUMN in card visual] ), 90)

 

Tutorial: Create your own measures in Power BI Desktop - Power BI | Microsoft Learn

DIVIDE function (DAX) - DAX | Microsoft Learn

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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