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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

CALCULATE Context

Hi community !

 

it's almost a shame to ask this easy peasy one but it's late here 🙂

 

I want to calculate some kind of a GroupBy measure like this :

 

CountryCityNbMeasure_to_build
SpainMadrid1025
SpainBarcelona1025
SpainAlicante525
ItalyRoma812
ItalyTurin212
ItalyFlorence212

 

 

I struggled a bit with CALCULATE and FILTER... but it'll be more effective from here !

 

Thank youuuu

 

Stephane

1 ACCEPTED SOLUTION
Aron_Moore
Solution Specialist
Solution Specialist

Keep in mind a table like you're showing will "filter" to the rows of the city.

You could try something like this:

Sum If = CALCULATE(SUM(Table[Nb]),ALL(Table[City]))
 
This will give you the total Nb filtering to country, but ignoring City.

View solution in original post

2 REPLIES 2
Aron_Moore
Solution Specialist
Solution Specialist

Keep in mind a table like you're showing will "filter" to the rows of the city.

You could try something like this:

Sum If = CALCULATE(SUM(Table[Nb]),ALL(Table[City]))
 
This will give you the total Nb filtering to country, but ignoring City.
Anonymous
Not applicable

thank you @Aron_Moore !

 

it does the trick and i do feel ashame 🙂

 

have a great day

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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