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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
ldamato
Frequent Visitor

Small Multiples Sum Wrong Values

Hi all, 

 

I'm using small multiples to create a chart that gets the running sum of each broker I have. 

To do the running sum, I use this formula (which works great): 

Measure = CALCULATE(SUM(Sheet1[Value]), FILTER(ALLSELECTED(Sheet1), Sheet1[date] <= MAX(Sheet1[date])))
 
The problem is that when I filter more than one small multiple, the values gets messed up.
Example: 
If I select only broker 1:  THIS IS CORRECT 
ldamato_0-1659720864372.png

 

If I select a second one on the filter: WRONG, The first one sums the value second one (14M) and both become wrong:

ldamato_1-1659720942216.png

Does anyone know how I could solve this please:

Sample data: smallmultiples_sample.xlsx

 

Thanks in advance

Leo

 

 

4 REPLIES 4
lbendlin
Super User
Super User

You can't use ALLSELECTED in that scenario and you shouldn't use MAX in the way you do.

cumul = 
var d = max(Sheet1[date])
return CALCULATE(sum(Sheet1[Value]),Sheet1[date]<=d)

lbendlin_0-1659828068781.png

see attached

 

 

 

Hi @lbendlin , 

 

Thanks for the reply. I tested it and it's pretty much what I need. The only issue is that I couldn't make it work using Date Hierarchy, only with the full date value. Is there anything I can do to make this work? 

 

Thanks a lot

Leo 

The use of date hierarchies is discouraged. Use a proper calendar table in your data model.

Hi @lbendlin 
I tried to create a calendar table, but did not manage to use the drill down function (which I need). Without a date hierarchy I couldn't see only month and year without the day, but with the possibility to drill down to days if I need. 

 

Thanks,
Leo

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.