March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi guys,
The overall challenge am facing is comparing last month store sales to determine wether reaches a certain amount and make a decision based on that. The problem am stuck with is it keeps aggregating at the filter context of the visual meaning it when i put employees in the visual it calculates last month sales based on the employee and not the store.
for example
Store | LastMonthSales |
1 | 100 |
2 | 120 |
3 | 150 |
Actual visual
Store | Employee | LastMonthSales |
1 | 1 | 75 |
1 | 2 | 25 |
2 | 1 | 80 |
2 | 2 | 40 |
3 | 1 | 50 |
3 | 2 | 75 |
3 | 3 | 25 |
Desire result
Store | Employee | LastMonthSales |
1 | 1 | 100 |
1 | 2 | 100 |
2 | 1 | 120 |
2 | 2 | 120 |
3 | 3 | 150 |
3 | 3 | 150 |
3 | 3 | 150 |
Any help would be greatly appreciated
Thanks,
Reynaldo
Solved! Go to Solution.
Hi, @reynaldo_malave
Based on your description, I have created some measures to achieve the effect you are looking for. Following picture shows the effect of the display.
Measures:
TotalSales =
CALCULATE (
SUM ( 'Table'[LastMonthSales] ),
ALLEXCEPT ( 'Table', 'Table'[Store] )
)
If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, @reynaldo_malave
Based on your description, I have created some measures to achieve the effect you are looking for. Following picture shows the effect of the display.
Measures:
TotalSales =
CALCULATE (
SUM ( 'Table'[LastMonthSales] ),
ALLEXCEPT ( 'Table', 'Table'[Store] )
)
If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
You need to create a measure to remove the employee row context, which can be done using the REMOVEFILTER function:
Last Month Store Sales = CALCULATE([Sales], REMOVEFILTER(Table[Employee]))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |