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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.