The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Everyone,
I thought this would be an easy measure to create but it is not working the way I want...
I am trying to display total sales by employee for all stores that they work at, but when I filter to a specific store, I only want to see the employees that have worked at the store but still see total sales at all stores. There are only a few employees who work at multiple locations. I either get the entire list of employees or only the sales at the one filtered location. I have tried multiple iterations of my "All Sales" measure.
Thank you in advance for your help.
Here are my two measures:
Tables and table relationships
Visual of the table
Solved! Go to Solution.
Hi,
Drag this measure to the visual
All sales revised = if([Total sales]=blank(),blank(),[All sales])
Hello @shansenTrek,
Thank you for reaching out to the Microsoft Fabric Community forum.
I’ve reproduced your scenario using my sample data and was able to get the expected output where:
I created a simple data model with 3 tables:
With relationships:
The Measures I used:
Measure 1: Total Sales (Respects Store Filter)
Total Sales = SUM(fSales[Sales])
Measure 2: All Sales (Ignores Store Filter on Store Table)
All Sales =
CALCULATE(
SUM(fSales[Sales]),
REMOVEFILTERS(dStore)
)
This setup allows the visual to:
I’m attaching the .pbix file for your reference so you can see the exact implementation.
If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.
Hello @shansenTrek,
Thank you for reaching out to the Microsoft Fabric Community forum.
I’ve reproduced your scenario using my sample data and was able to get the expected output where:
I created a simple data model with 3 tables:
With relationships:
The Measures I used:
Measure 1: Total Sales (Respects Store Filter)
Total Sales = SUM(fSales[Sales])
Measure 2: All Sales (Ignores Store Filter on Store Table)
All Sales =
CALCULATE(
SUM(fSales[Sales]),
REMOVEFILTERS(dStore)
)
This setup allows the visual to:
I’m attaching the .pbix file for your reference so you can see the exact implementation.
If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.
Hi,
Drag this measure to the visual
All sales revised = if([Total sales]=blank(),blank(),[All sales])
You will need to deactivate the relationships for that.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
User | Count |
---|---|
77 | |
76 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
79 | |
57 | |
48 | |
48 |