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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

total trasaction in each age group

I have age in X table and i have amount column in Y table, i have created the age bin in X table.

now i want to calculate total amount in each age bin which function i should use

please do the needful

1 ACCEPTED SOLUTION

hi @Anonymous 

you would need to

1) add a column with this:

AgeGroup =
SWITCH(
    TRUE(),
    [Age]<=15, "5-15",
    [Age]<=30, "16-30",
    [Age]<=55, "30-55",
    [Age]<=65, "56-65",
    "65&Above"
)
 
2) then plot Amount and AgeGroup columns in a table visual. 
 
I tried and it worked like this:
FreemanZ_0-1671323001446.png

 

for the 2) step, you may also choose to create a calculated table like this:

FreemanZ_1-1671323202000.png
SumTable =
ADDCOLUMNS(
    VALUES('Table'[AgeGroup]),
    "Amt",
    CALCULATE(SUM('Table'[Amt]))
)

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

How can i create shape map with data labels on it like tableau

 

please refer below screen shot

vijaykumargade_0-1671373956813.png

 

Anonymous
Not applicable

this is power bi shape map

 

vijaykumargade_1-1671374009885.png

 

Anonymous
Not applicable

Age                  amount

 05                   20000

16                    60000

31                   700000

56                   400000

66                   1000000

30                   1200000  

26                   4500000

20                   60000000   

17                   9000000

 

 

i have created age bucket

05-15              20000

16-30              

31-55

56-65

66 & Above

 

now i want to calculate what is the total amount in each age group

 

 

 

hi @Anonymous 

you would need to

1) add a column with this:

AgeGroup =
SWITCH(
    TRUE(),
    [Age]<=15, "5-15",
    [Age]<=30, "16-30",
    [Age]<=55, "30-55",
    [Age]<=65, "56-65",
    "65&Above"
)
 
2) then plot Amount and AgeGroup columns in a table visual. 
 
I tried and it worked like this:
FreemanZ_0-1671323001446.png

 

for the 2) step, you may also choose to create a calculated table like this:

FreemanZ_1-1671323202000.png
SumTable =
ADDCOLUMNS(
    VALUES('Table'[AgeGroup]),
    "Amt",
    CALCULATE(SUM('Table'[Amt]))
)
Anonymous
Not applicable

I have one query

there is visual with personal information with filter, how can i create the same

please see the below screen shot

 

vijaykumargade_0-1671372871466.png

 

Anonymous
Not applicable

also how can i create shape map with labels on it like in  tableau

below is the screen shots for power bi and tableau maps

 

tableau map

vijaykumargade_3-1671374166221.png

 

power bi shape map

vijaykumargade_2-1671374120735.png

 

 

 

Greg_Deckler
Community Champion
Community Champion

@Anonymous SUM or SUMX?

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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