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

The Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more

Reply
ttaa4455
Frequent Visitor

Nested Measure

Hello, 

 

I have the following measure set and it function as I went it to : 

VAR DistinctProds = 

SUMMARIZE(Monthly_Measure,Products[Products_ID],Stores[Store_ID]

VAR Prod=

Countrows(Distinct Prods)

Return

Prod. 

 

But the issue I have is that a have another column in the 'Monthly_Measure' Table called Quanity_Cases and I need that measure I showed above to filter out any rows that have a Quanity_Case of 0 or less. How can I do that? 

 

Thank you!!

1 ACCEPTED SOLUTION
tamerj1
Community Champion
Community Champion

Hi @ttaa4455 
Please try

=
VAR DistinctProds =
    SUMMARIZE (
        FILTER ( Monthly_Measure, Monthly_Measure[Quanity_Cases] > 0 ),
        Products[Products_ID],
        Stores[Store_ID]
    )
VAR Prod =
    COUNTROWS ( DistinctProds )
RETURN
    Prod

View solution in original post

2 REPLIES 2
tamerj1
Community Champion
Community Champion

Hi @ttaa4455 
Please try

=
VAR DistinctProds =
    SUMMARIZE (
        FILTER ( Monthly_Measure, Monthly_Measure[Quanity_Cases] > 0 ),
        Products[Products_ID],
        Stores[Store_ID]
    )
VAR Prod =
    COUNTROWS ( DistinctProds )
RETURN
    Prod

Thank you!! That worked!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.