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
Mad
Regular Visitor

Getting a total ignoring the filter on names but taking into account the time filters

Hi,

 

I am trying to get a pivot table running with the following filters set above or as a slicer:

- Calendar week

- Year

 

In the table itself, I want to see the following columns:

 

- Top 10 results name

- Value

- % of the total, ie including everything below the top 10

 

I tested the following formulas: 

 

=Calculate([TOTAL SALES];ALL(Orders)) -> this ignores the need for me to have only the result of this week and year. It gets all results ignoring the time frame which is needed to stay

=DIVIDE([TOTAL SALES];CALCULATE([TOTAL SALES];ALLSELECTED(Orders)) -> this restricts the numbers to the top 10 results

 

I am guessing I need a mix of both and specify a filter with the year and week, but I get errors when I try. How should I proceed here?

 

Thanks,

 

Pauline.

 

 

 

1 REPLY 1
amitchandak
Super User
Super User

@Mad , Based on what I got you need to try

 

Correct the column - Data[Client Name] // use on what you want top 10

 

divide(calculate([TOTAL SALES],TOPN(10,allselected(Data[Client Name]),[TOTAL SALES],DESC), values(Data[Client Name]))
, calculate([TOTAL SALES],TOPN(10,allselected(Data[Client Name]),[TOTAL SALES],DESC)))

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.

Top Solution Authors