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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
ING_BT
Helper I
Helper I

Help with simple measure - Filter, summarize, several conditions.

Hello

I want to create a measure - I know I am close, but it still doesn't do exactly what I need. Below all the details: 


As you can see here, the goal is the get this 1.15% by dividing the metric 2 by the metric 1. 
Except, we want to calculate the metric 2 only when a store has over 50. 
And, we want to calculate the metric 1 only when a store has over 0 (simply to say that we need to sum, per store, only when 2 is present). 

The measure provide below works well when only one store is filtered. However, when several are, like the example below, it takes too many values from 'metric 1' (metric 2 doesn't seem to be the issue here). 

I should be able to look a this measure in a card without filters. And in a table when adding stores to see per store.

 

Could you please help me, or guide me to the right answer?

 

Table.pngtables.png
*(this is an example, the real tables have way more rows and dimensions. There are also over 100 stores.)

Measure = 

Var Dtable = 
FILTER(
    'Table D',
    [Metric 2 ]>50)

Var Ctable = 
FILTER(
    TableC,
    [Metric 2 ]>0)

 
Var _B = 
CALCULATE([Metric 2],Btable)

Var _A = 
CALCULATE([Metric 1],dtable,ctable,ALLEXCEPT(TableA,TableC[Date]))

Return
DIVIDE(_B,_A)

 
Thank you,
BT

1 REPLY 1
lbendlin
Super User
Super User

Read about aggregation function like SUMMARIZE.

 

Think like the Grand Total. Very often measures designed for the Grand Total will also work for the Row and Column Totals and for the individual cells.

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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