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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vanni_martignag
Frequent Visitor

Filter page filter on CUMULATE ALL measure

Hi,

I'm new to PBI world, I wrote this measure to calculate total sales for single model item:

ModelSales =
CALCULATE (
[Total Amount];
ALL( dimItem ) ;
dimItem[Model Item No] = EARLIER ( dimItem[Model Item No] );
dimCCR[Code]="A-PF";dimSalesOrder[Order Type]="Seasonal";
dimTrademark[Code]="USPA"
)
I added also extra filters to the end that I normally use in report filter, because I can't understand how to use ALL function and keep this global filters.
Someone can help me?
 
Thank you
3 REPLIES 3
v-xuding-msft
Community Support
Community Support

Hi @vanni_martignag ,

Could you please share some sample data and your expected results? Then we will understand your request clearly.

 

Please see this post regarding How to Get Your Question Answered Quickly: 

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
sturlaws
Resident Rockstar
Resident Rockstar

Hi @vanni_martignag,

welcome to the power bi forum.

I cant quite get the grasp of what you want to achieve. Do you want to have a measure that calculates the sale for one specific item? Or do you want to visualize a table with the sales of each item? Should your model respond to changes in slicers/filters from e.g. dimCCR[Code] in the report?

If the first it the case, and you want the report to respond to the reportfilters the code should look something like this:

ModelSales =
CALCULATE (
    [Total Amount];
    FILTER (
        ALL ( dimItem[Model Item No] );
        dimItem[Model Item No] = Insert Model Item No here(e.g. 42)
    )
)

 

Cheers,
Sturla


If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

Hi Sturlaws,

I need to culculate the sum of sales of item that has same model in common, and keep filters that is used on report.

Cattura.PNG

As you can see from my data model,  minimun granularity of dimItem is ItemNumber but I need to get total sales for dimItem[Model], but if I use ALL fuction it removes all filters but I what to keep filter on dimSalesOrder[OrderType].


I hope it is more clear now.

 

Thank you

Vanni

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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