Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have a matrix visual row grouped by Customer, Product Category and Sub Product Category and three measures as values. However, on Measure 3 I want to exclude customers that had no sales in Measure 1 OR Measure 2 as the business is not interested in them for this study. I can't seem to figure out how to exclude in Measure 3 those customers we are not interested in looking at. The outcome always ends up including those customers of no interest.
I have tried using:
But I lose the respected total summarization in scope of the sub category totals and Grand total unexpectedly.
How do I go about summarizing Measure 3 to exclude customers with no sales in Measure 1 OR Measure 2 like the screenshot below keeping in mind that I will be adding and expanding by Customer, Product Category and then Product Sub Category:
Problem
Expected Result:
Below are the measures used (*** rewrote the measures below to keep it simplistic):
- Star Schema Data Model containing a dimProduct, dimCustomer and factSales table
Measure 1 = CALCULATE(
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi @spin1888
How many relevant tables do you have and how are they related?
It seems you have a dimProduct table, at least a sales record table and maybe a customer table.
Sorry about that; it is a star schema data model that has a dimProduct, dimCustomer and factSales tables
can you describe how they are related and provide some sample data of each table?
Sample file available here:
Unfortunately I can't provide sample data due to the sensitive nature but have a AdventureWorks pbix file mimicing the same scenerio.
Hi,
Does this measure work?
Measure 3 = CALCULATE ( [Line Amount USD], FILTER(dimProduct, ProductCategory = "Product 3"&&[Measure 2]<>blank()&&[Measure 1]<>blank())) 
					
				
			
			
				Thanks Ashish that worked but returned incorrect results. For example Customer A that had sales in Measure 1 and Measure 2 displayed $300 worth of sales for Measure 3 but I know for sure they are suppose to have $4,000 in sales.
Hi,
I will need to see the PBi file. Show the problem there clearly and also show the expected result.
Sure; what is the best way to send a pbix file. I have created a pbix file using the AdventureWorks as source and mimic the same scenerio I am working on.
Upload the file to Google Drive/One Drive and share the download link.
Here is the temp link to my OneDrive:
https://1drv.ms/u/s!AiGc_nsXDNeNgqE32eTthgrHIl3aKg?e=Mjju8t
Measure 3 =
VAR __tbl = CROSSJOIN ( VALUES ( Customer[Customer] ), VALUES ( 'Product'[Category] ))
VAR _m3 =
CALCULATE (
[LineAmountUSD],
FILTER ( 'Product', 'Product'[Category] = "Bikes" )
)
RETURN
IF (
NOT ( ISBLANK ([Measure 1] ) ) || NOT ( ISBLANK ([Measure 2] ) ),
IF (
ISINSCOPE ( Customer[Customer] ),
_m3,
SUMX (__tbl,_m3)))
Thank you Ashish;
We are getting close. The following below worked as needed keeping the grand total at $94 M:
Hi,
You may download my PBI file from here.
Hope this helps.
Hey Ashish;
I tried to replicate it however I am noticing my results are coming in blank for [Measure] and [Measure 4]. Also, noticed that [Measures 1] and [Measure 2] repeat itself for every product category:
New File:
Replicated Tab:
Recheck everything with my solution file. If you are still unable to solve, then share the download link of the PBI file.
Beautifully well written. Thank you!!
You are welcome.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.