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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
edvapran
New Member

group data by dimension (aggr function in qlik sense)

Hi, there's no way to say this problem easily..

I have 3 tables:

  • POS current month data table (item, location code, datetime, sales amount)
  • plan table (location code, latitude,longitude, sales plan)
  • location table (location code, latitude,longitude) 

These tables have a relation by location code column: PLAN 1-* POS *-1 LOCATION

Main goal is to show a map chart that displays location code on the map with it's sales plan execution percentage.

 

In Qlik Sense its super easy, there is a aggr function, that automatically groups by any dimmension:

sum([Sales amount]) / sum(aggr(sum([Sales plan]),[Location code]))

 

In powerBI Plan table I have added:

(new column) TotalSales = sumx(relatedtable(POS);POS[Sales amount])

(new measue) Execution = sum(Plan[TotalSales]) / sum(Plan[Sales plan])

 

Abviously now every location shows the same execution percentage, because there is no grouping by location. How to solve this?

 

1 ACCEPTED SOLUTION

Ok, I managed to find a solution, it has to with relationship, [Cross filter direction] has to be set to both directions. Have no idea why isn't this set as default...

 

 

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

Generally add Location to your Legend and you will get your grouping.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Does not allow to add this field to Map's Legend.

I have also tried to create a simple chart, same result, all locations show the same execution percentage.

Ok, I managed to find a solution, it has to with relationship, [Cross filter direction] has to be set to both directions. Have no idea why isn't this set as default...

 

 

Bi-directional cross filtering used to be the default but they changed this some time back. Probably had to do with performance and that bi-directional cross filtering is often not necessary. It is more the exception than the rule.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors